1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owntracks_ynh.git synced 2024-09-03 19:56:24 +02:00
This commit is contained in:
Éric Gaspar 2023-10-17 10:22:02 +02:00 committed by Félix Piédallu
parent 979dc8c5d9
commit 9f9b8f2927
3 changed files with 14 additions and 1 deletions

3
conf/config.example.js Normal file
View file

@ -0,0 +1,3 @@
// Here you can overwite the default configuration values
window.owntracks = window.owntracks || {};
window.owntracks.config = {};

View file

@ -47,6 +47,16 @@ pushd $install_dir
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production yarn build
popd
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="config.example.js" --destination="$install_dir/public/config/config.js"
chmod 400 "$install_dir/public/config/config.js"
chown $app:$app "$install_dir/public/config/config.js"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -26,7 +26,7 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir" --keep="public/config/config.js"
fi
chmod -R o-rwx "$install_dir"