mirror of
https://github.com/YunoHost-Apps/ghost_ynh.git
synced 2024-09-03 19:16:02 +02:00
register daemon in ynh services
This commit is contained in:
parent
fc39760cba
commit
46d61f56bd
4 changed files with 6 additions and 2 deletions
2
TODO.org
2
TODO.org
|
@ -6,7 +6,7 @@
|
|||
* DONE mail in config.js : what's this ?
|
||||
** mails are working
|
||||
** http://docs.ghost.org/usage/configuration/
|
||||
* BLOCKED add to ynh service list
|
||||
* DONE add to ynh service list
|
||||
** how do i do that ??
|
||||
* TODO reduce size of install tree
|
||||
admin@yunohost:/home/yunohost.app/ghostblog$ du -sh *
|
||||
|
|
|
@ -24,7 +24,7 @@ DAEMON=/usr/bin/node
|
|||
DAEMON_ARGS="$GHOST_ROOT/index.js"
|
||||
PIDFILE=/var/run/yunohost/ghostblog/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
LOGFILE="/var/log/$NAME.log"
|
||||
LOGFILE="YNH_LOGFILE"
|
||||
export NODE_ENV=production
|
||||
|
||||
# Exit if the package is not installed
|
||||
|
|
|
@ -46,13 +46,16 @@ sed -i "s@YNH_LOCATION@$path@g" ../conf/nginx.conf
|
|||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ghostblog.conf
|
||||
|
||||
echo "Init script..."
|
||||
logfile=/var/log/ghostblog.log
|
||||
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
|
||||
sed -i "s@YNH_LOGFILE@$logfile@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
|
||||
sudo service ynh-app-ghostblog start
|
||||
sudo yunohost app service ynh-app-ghostblog -l $logfile
|
||||
|
||||
echo "Reloading Nginx..."
|
||||
if [ $is_public = "Yes" ];
|
||||
|
|
|
@ -7,6 +7,7 @@ sudo userdel --remove ghostblog
|
|||
sudo service ynh-app-ghostblog stop
|
||||
sudo update-rc.d ynh-app-ghostblog remove
|
||||
sudo rm /etc/init.d/ynh-app-ghostblog
|
||||
sudo yunohost app service -R ynh-app-ghostblog
|
||||
|
||||
sudo rm -f /etc/nginx/conf.d/$domain.d/ghostblog.conf
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue