Update Ghost installation script to include URL and modify service execution

This commit is contained in:
fabrice1236 2025-01-06 22:01:42 +01:00
parent 0fd64e22a1
commit 4e35e582eb
2 changed files with 7 additions and 4 deletions

View File

@ -30,9 +30,10 @@ function update_script() {
check_container_storage
check_container_resources
msg_info "Updating ${APP} LXC"
# CHECK FOR NPM HERE !
# CHECK FOR NPM HERE !
if command -v ghost &> /dev/null; then
current_version=$(ghost --version | awk '{print $2}')
current_version=$(ghost --version | awk '{print $2}') #TO REVIEW
latest_version=$(npm show ghost-cli version)
if [ "$current_version" != "$latest_version" ]; then
msg_info "Updating ${APP} from version $current_version to $latest_version"

View File

@ -66,7 +66,7 @@ msg_info "Setting up Ghost"
mkdir -p /var/www/ghost
chown -R ghost-user:ghost-user /var/www/ghost
chmod 775 /var/www/ghost
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"
sudo -u ghost-user -H sh -c "cd /var/www/ghost && ghost install --db=mysql --dbhost=localhost --dbuser=root --dbpass=ghost --dbname=ghost --url=http://localhost:2368 --no-prompt --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd --no-setup-mysql --no-start --no-enable"
msg_ok "Ghost setup completed"
# Creating Service (if needed)
@ -77,8 +77,10 @@ Description=${APPLICATION} Service
After=network.target
[Service]
ExecStart=/usr/bin/ghost run
ExecStart=/usr/bin/ghost start
WorkingDirectory=/var/www/ghost
User=ghost-user
Group=ghost-user
Restart=always
[Install]