make janitor a systemd timer
one process lesser
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
Description=Cloudron Smart Cloud
|
||||
Documentation=https://cloudron.io/documentation.html
|
||||
StopWhenUnneeded=true
|
||||
Requires=apphealthtask.service box.service janitor.service oauthproxy.service
|
||||
After=apphealthtask.service box.service janitor.service oauthproxy.service
|
||||
Requires=apphealthtask.service box.service janitor.timer oauthproxy.service
|
||||
After=apphealthtask.service box.service janitor.timer oauthproxy.service
|
||||
# AllowIsolate=yes
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
[Unit]
|
||||
Description=Cloudron Janitor
|
||||
OnFailure=crashnotifier@%n.service
|
||||
StopWhenUnneeded=true
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
Type=simple
|
||||
WorkingDirectory=/home/yellowtent/box
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/node --optimize_for_size --max_semi_space_size=5 --max_old_space_size=30 /home/yellowtent/box/janitor.js
|
||||
Restart=no
|
||||
ExecStart=/usr/bin/node /home/yellowtent/box/janitor.js
|
||||
Environment="HOME=/home/yellowtent" "USER=yellowtent" "DEBUG=box*,connect-lastmile" "BOX_ENV=cloudron" "NODE_ENV=production"
|
||||
KillMode=process
|
||||
User=yellowtent
|
||||
Group=yellowtent
|
||||
MemoryLimit=50M
|
||||
|
||||
WatchdogSec=30
|
||||
|
||||
10
setup/container/systemd/janitor.timer
Normal file
10
setup/container/systemd/janitor.timer
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Cloudron Janitor
|
||||
StopWhenUnneeded=true
|
||||
|
||||
[Timer]
|
||||
# this activates it immediately
|
||||
OnBootSec=0
|
||||
OnUnitActiveSec=30min
|
||||
Unit=janitor.service
|
||||
|
||||
Reference in New Issue
Block a user