diff --git a/install/ghost-install.sh b/install/ghost-install.sh index 78200f27..c50039d4 100644 --- a/install/ghost-install.sh +++ b/install/ghost-install.sh @@ -56,16 +56,17 @@ msg_ok "Installed Ghost CLI" # Create a new user for Ghost -adduser ghost-user -usermod -aG sudo ghost-user +msg_info "Creating ghost-user" +$STD adduser --disabled-password --gecos "Ghost user" ghost-user +$STD usermod -aG sudo ghost-user +msg_ok "Created ghost-user" # Set up Ghost msg_info "Setting up Ghost" mkdir -p /var/www/ghost -chown -R $USER:$USER /var/www/ghost +chown -R ghost-user:ghost-user /var/www/ghost chmod 775 /var/www/ghost -cd /var/www/ghost -$STD sudo -u ghost-user ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --no-prompt --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd +sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --no-prompt --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd" msg_ok "Ghost setup completed" # Creating Service (if needed)