diff --git a/conf/cron b/conf/cron index 0a4a94e..e77dd92 100644 --- a/conf/cron +++ b/conf/cron @@ -1 +1 @@ -* * * * * root curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/checkStatus' --header 'Authorization: Bearer __CRON_KEY__' ; curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/getStorageUsed' --header 'Authorization: Bearer __CRON_KEY__' \ No newline at end of file +10 * * * * root curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/checkStatus' --header 'Authorization: Bearer __CRON_KEY__' ; curl --request POST --url 'http://127.0.0.1:__PORT__/api/cronjob/getStorageUsed' --header 'Authorization: Bearer __CRON_KEY__' \ No newline at end of file diff --git a/scripts/upgrade b/scripts/upgrade index d609955..70a8806 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,6 +51,11 @@ ynh_add_nginx_config ynh_add_systemd_config +# Update cron in case of changes +ynh_add_config --template="cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" + yunohost service add $app --description="WebUI for BorgBackup" --log="/var/log/$app/$app.log" #================================================= @@ -65,6 +70,16 @@ ynh_add_config --template=".env" --destination="/home/yunohost.app/$app/app/.env chmod 400 "/home/yunohost.app/$app/app/.env.local" chown $app:$app "/home/yunohost.app/$app/app/.env.local" +#================================================= +# INSTALL BORGWARHOUSE +#================================================= + +pushd /home/yunohost.app/$app/app + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm ci + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH NODE_ENV=production $ynh_npm run build +popd + #================================================= # START SYSTEMD SERVICE #=================================================