diff --git a/conf/systemd.service b/conf/systemd.service index 301d80e..84dacfe 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -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' diff --git a/scripts/install b/scripts/install index 3bcce28..ae6dcbe 100644 --- a/scripts/install +++ b/scripts/install @@ -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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0ac8fc0..faa00c8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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"