1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Fix DB dir instead of using tmp files

This commit is contained in:
yalh76 2019-02-02 20:47:00 +01:00
parent e2c10824a2
commit f1d8696ff3
3 changed files with 16 additions and 1 deletions

View file

@ -8,6 +8,7 @@ User=__APP__
Group=__APP__
Environment="PATH=__NODEJS_PATH__"
Environment="PORT=__PORT__"
Environment="DB_DIR=__FINALPATH__/db"
WorkingDirectory=__FINALPATH__/
ExecStart=/bin/sh -c '__FINALPATH__/node_modules/.bin/ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1'

View file

@ -174,6 +174,12 @@ ynh_system_user_create "$app" "$final_path"
mkdir -p "/var/log/$app"
chown -R "$app":"$app" "/var/log/$app"
#=================================================
# CREATE DB FOLDER
#=================================================
mkdir -p "$final_path/db"
#=================================================
# MAKE SETUP
#=================================================

View file

@ -119,7 +119,15 @@ ynh_system_user_create "$app" "$final_path"
#=================================================
# SPECIFIC UPGRADE
#=================================================
# ...
#=================================================
# CREATE DB FOLDER
#=================================================
mkdir -p "$final_path/db"
#=================================================
# MAKE INSTALL
#=================================================
chown -R "$app":"$app" "$final_path"