mirror of
https://github.com/YunoHost-Apps/gancio_ynh.git
synced 2024-09-03 20:36:19 +02:00
use data dir for config
This commit is contained in:
parent
de83ec9fdd
commit
ce8d5b0eb9
3 changed files with 9 additions and 9 deletions
|
@ -8,7 +8,7 @@ User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__/
|
WorkingDirectory=__INSTALL_DIR__/
|
||||||
Environment="__YNH_NODE_LOAD_PATH__"
|
Environment="__YNH_NODE_LOAD_PATH__"
|
||||||
ExecStart=__YNH_NODE__ server/cli.js start --config __INSTALL_DIR__/config.json
|
ExecStart=__YNH_NODE__ server/cli.js start --config __DATA_DIR__/config.json
|
||||||
|
|
||||||
# Sandboxing options to harden security
|
# Sandboxing options to harden security
|
||||||
# Depending on specificities of your service/app, you may need to tweak these
|
# Depending on specificities of your service/app, you may need to tweak these
|
||||||
|
|
|
@ -68,8 +68,7 @@ ynh_script_progression --message="Installing app dependencies and creating admin
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install # Install dependencies
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install
|
||||||
#ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn build
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $mail $password admin --config ./config.json
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $mail $password admin --config ./config.json
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="config.json"
|
ynh_setup_source --dest_dir="$install_dir" --full_replace=1
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
@ -53,12 +53,12 @@ yunohost service add $app --description="Federated shared agenda for local commu
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
#ynh_script_progression --message="Updating a configuration file..." --weight=1
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||||
|
|
||||||
#ynh_add_config --template="config.json" --destination="$install_dir/config.json"
|
ynh_add_config --template="config.json" --destination="$data_dir/config.json"
|
||||||
|
|
||||||
#chmod 400 "$install_dir/config.json"
|
chmod 400 "$data_dir/config.json"
|
||||||
#chown $app:$app "$install_dir/config.json"
|
chown $app:$app "$data_dir/config.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE THE APP
|
# CONFIGURE THE APP
|
||||||
|
@ -67,7 +67,8 @@ ynh_script_progression --message="Updating app dependencies..." --weight=15
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install # Install/upgrade dependencies
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $mail $password admin --config $data_dir/config.json
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue