1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

avoid repeating pid dir path

This commit is contained in:
Julien Malik 2014-03-19 22:45:16 +01:00
parent 6d2d0c08d5
commit 4a3d89762a
3 changed files with 7 additions and 6 deletions

View file

@ -8,7 +8,7 @@
** http://docs.ghost.org/usage/configuration/ ** http://docs.ghost.org/usage/configuration/
* DONE add to ynh service list * DONE add to ynh service list
** how do i do that ?? ** how do i do that ??
* TODO reduce size of install tree * DONE reduce size of install tree
admin@yunohost:/home/yunohost.app/ghostblog$ du -sh * admin@yunohost:/home/yunohost.app/ghostblog$ du -sh *
50M ghost 50M ghost

View file

@ -22,7 +22,8 @@ GHOST_GROUP=ghostblog
GHOST_USER=ghostblog GHOST_USER=ghostblog
DAEMON=/usr/bin/node DAEMON=/usr/bin/node
DAEMON_ARGS="$GHOST_ROOT/index.js" DAEMON_ARGS="$GHOST_ROOT/index.js"
PIDFILE=/var/run/yunohost/ghostblog/$NAME.pid PIDFILEDIR=/var/run/yunohost/ghostblog
PIDFILE=$PIDFILEDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
LOGFILE="YNH_LOGFILE" LOGFILE="YNH_LOGFILE"
export NODE_ENV=production export NODE_ENV=production
@ -49,8 +50,8 @@ VERBOSE=yes
do_start() do_start()
{ {
# Set up folder structure # Set up folder structure
mkdir -p /var/run/yunohost/ghostblog mkdir -p $PIDFILEDIR
chown -R $GHOST_USER:$GHOST_GROUP /var/run/yunohost/ghostblog chown -R $GHOST_USER:$GHOST_GROUP $PIDFILEDIR
# Return # Return
# 0 if daemon has been started # 0 if daemon has been started
# 1 if daemon was already running # 1 if daemon was already running

View file

@ -32,8 +32,8 @@ sudo su --shell /bin/bash --command "cd $final_path/ghost && npm install --produ
echo "Cleaning up install tree..." echo "Cleaning up install tree..."
sudo rm -rf $final_path/.npm sudo rm -rf $final_path/.npm
find $final_path -type d | grep test$ | xargs sudo rm -rf find $final_path -type d | grep "test$" | xargs sudo rm -rf
find $final_path -type d | grep tests$ | xargs sudo rm -rf find $final_path -type d | grep "tests$" | xargs sudo rm -rf
sudo rm -rf $final_path/ghost/node_modules/sqlite3/build sudo rm -rf $final_path/ghost/node_modules/sqlite3/build
echo "Deploying configuration..." echo "Deploying configuration..."