Fix dapostinstall update step under set -e
This commit is contained in:
+10
-2
@@ -63,6 +63,15 @@ build_php_extension() {
|
||||
da build set "$option" yes
|
||||
da build "$target"
|
||||
}
|
||||
|
||||
update_daupdate_tools() {
|
||||
echo "update..."
|
||||
wget "$HTLINK/daupdate.sh" -O /sbin/daupdate
|
||||
chmod +x /sbin/daupdate
|
||||
wget "$HTLINK/daupdate.sh" -O /opt/daupdate
|
||||
wget "$HTLINK/da_cli.sh" -O /sbin/dacli
|
||||
chmod +x /sbin/dacli
|
||||
}
|
||||
exec > >(tee -ia "$LOG_FILE") 2>&1
|
||||
cd "$DAPOSTINSTALL_DIR"
|
||||
# shellcheck source=lib/common.sh
|
||||
@@ -76,8 +85,7 @@ yum -y install epel-release
|
||||
yum -y install htop wget rsync nano mc ncdu borgbackup screen net-tools htop libmemcached libmemcached-devel
|
||||
cp daupdate.sh /opt
|
||||
chmod 700 /opt/daupdate.sh
|
||||
cd /opt/
|
||||
/opt/daupdate.sh update
|
||||
update_daupdate_tools
|
||||
cd "$DAPOSTINSTALL_DIR"
|
||||
clear
|
||||
cd "$DAPOSTINSTALL_DIR"
|
||||
|
||||
@@ -51,6 +51,8 @@ assert_file_contains "$ROOT_DIR/dapostinstall.sh" '^opcache=yes$'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" '^imap=yes$'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" '^imagick=yes$'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" '^SETUP_TXT="\$DADIR/conf/setup\.txt"$'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" '^update_daupdate_tools\(\) \{$'
|
||||
assert_file_not_contains "$ROOT_DIR/dapostinstall.sh" '/opt/daupdate\.sh update'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" 'require_file "\$SETUP_TXT"'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" 'DA_ADMINPASS=\$\(get_key_value "\$SETUP_TXT" "adminpass"\)'
|
||||
assert_file_contains "$ROOT_DIR/dapostinstall.sh" 'set_key_value "\$DADIR/conf/directadmin\.conf" "ns1" "\$DEFAULT_NS1"'
|
||||
|
||||
Reference in New Issue
Block a user