2021-03-11 00:34:24 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
# dependencies used by the app
|
2021-09-09 09:52:36 +02:00
|
|
|
pkg_dependencies="curl jq"
|
2021-03-11 00:34:24 +01:00
|
|
|
|
|
|
|
# nodejs version
|
|
|
|
nodejs_version=12
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
dato_setup_config_files() {
|
2022-07-29 01:48:52 +02:00
|
|
|
# create config directory (if it doesn't exist yet)
|
|
|
|
[ -d "$final_path/config/" ] || mkdir "$final_path/config/"
|
|
|
|
|
|
|
|
# setup public dato config
|
|
|
|
ynh_add_config --template="../conf/public.js" --destination="$final_path/config/public.js"
|
|
|
|
chmod 400 "$final_path/config/public.js"
|
|
|
|
chown $app:$app "$final_path/config/public.js"
|
|
|
|
|
|
|
|
# setup private dato config
|
|
|
|
if [[ $autosynchronize == true ]]; then
|
|
|
|
ynh_add_config --template="../conf/private-autosync.js" --destination="$final_path/config/private.js"
|
|
|
|
else
|
|
|
|
ynh_add_config --template="../conf/private.js" --destination="$final_path/config/private.js"
|
|
|
|
fi
|
|
|
|
chmod 400 "$final_path/config/private.js"
|
|
|
|
chown $app:$app "$final_path/config/private.js"
|
2021-03-11 00:34:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# FUTURE OFFICIAL HELPERS
|
|
|
|
#=================================================
|