mirror of
https://github.com/YunoHost-Apps/borgwarehouse_ynh.git
synced 2024-09-03 18:16:17 +02:00
commit
fcf70ffc32
2 changed files with 16 additions and 1 deletions
|
@ -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__'
|
||||
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__'
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue