From c0fc134a61904f24656fa5fe233c05f5cdaa5fef Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Wed, 19 Mar 2014 00:18:50 +0100 Subject: [PATCH] change install path --- TODO.org | 2 +- conf/init-script | 2 +- scripts/install | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TODO.org b/TODO.org index 96524ec..fa4e683 100644 --- a/TODO.org +++ b/TODO.org @@ -30,7 +30,7 @@ admin@yunohost:/home/yunohost.app/ghostblog$ du -sh ghost/* * TODO implement upgrade * TODO mysql instead of sqlite ** http://docs.ghost.org/usage/configuration/ -* TODO change installation path +* DONE change installation path * DONE change pid file path ** let's stay with /var/run/yunohost/ghostblog for the moment * DONE cleanup pid file diff --git a/conf/init-script b/conf/init-script index 53a1f89..a3fb78d 100644 --- a/conf/init-script +++ b/conf/init-script @@ -17,7 +17,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Ghost" NAME=ynh-app-ghostblog -GHOST_ROOT=/home/yunohost.app/ghostblog/ghost +GHOST_ROOT=YNH_FINALPATH/ghost GHOST_GROUP=ghostblog GHOST_USER=ghostblog DAEMON=/usr/bin/node diff --git a/scripts/install b/scripts/install index a60b5e5..a0dc6f5 100644 --- a/scripts/install +++ b/scripts/install @@ -22,7 +22,7 @@ sudo wget -O ../tmp/ghost-$version.zip "https://en.ghost.org/zip/ghost-$version. unzip ../tmp/ghost-$version.zip -d ../tmp/ghost echo "Deploying source files..." -final_path=/home/yunohost.app/ghostblog +final_path=/var/www/ghostblog sudo mkdir -p $final_path sudo useradd -d $final_path ghostblog @@ -46,6 +46,7 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ghostblog.conf echo "Init script..." sudo touch /var/log/ynh-app-ghostblog.log sudo chown ghostblog: /var/log/ynh-app-ghostblog.log +sed -i "s@YNH_FINALPATH@$final_path@g" ../conf/init-script sudo cp ../conf/init-script /etc/init.d/ynh-app-ghostblog sudo chmod +x /etc/init.d/ynh-app-ghostblog sudo update-rc.d ynh-app-ghostblog defaults