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:
parent
6d2d0c08d5
commit
4a3d89762a
3 changed files with 7 additions and 6 deletions
2
TODO.org
2
TODO.org
|
@ -8,7 +8,7 @@
|
|||
** http://docs.ghost.org/usage/configuration/
|
||||
* DONE add to ynh service list
|
||||
** 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 *
|
||||
50M ghost
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ GHOST_GROUP=ghostblog
|
|||
GHOST_USER=ghostblog
|
||||
DAEMON=/usr/bin/node
|
||||
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
|
||||
LOGFILE="YNH_LOGFILE"
|
||||
export NODE_ENV=production
|
||||
|
@ -49,8 +50,8 @@ VERBOSE=yes
|
|||
do_start()
|
||||
{
|
||||
# Set up folder structure
|
||||
mkdir -p /var/run/yunohost/ghostblog
|
||||
chown -R $GHOST_USER:$GHOST_GROUP /var/run/yunohost/ghostblog
|
||||
mkdir -p $PIDFILEDIR
|
||||
chown -R $GHOST_USER:$GHOST_GROUP $PIDFILEDIR
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
|
|
|
@ -32,8 +32,8 @@ sudo su --shell /bin/bash --command "cd $final_path/ghost && npm install --produ
|
|||
|
||||
echo "Cleaning up install tree..."
|
||||
sudo rm -rf $final_path/.npm
|
||||
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 "test$" | 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
|
||||
|
||||
echo "Deploying configuration..."
|
||||
|
|
Loading…
Add table
Reference in a new issue