2015-09-07 11:18:44 -07:00
|
|
|
[Unit]
|
2025-06-17 22:28:38 +02:00
|
|
|
Description=Box
|
2017-01-25 11:28:27 -08:00
|
|
|
After=mysql.service nginx.service
|
2016-12-30 11:27:00 -08:00
|
|
|
; As cloudron-resize-fs is a one-shot, the Wants= automatically ensures that the service *finishes*
|
|
|
|
|
Wants=cloudron-resize-fs.service
|
2015-09-07 11:18:44 -07:00
|
|
|
|
2020-08-01 20:00:20 -07:00
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
|
2015-09-07 11:18:44 -07:00
|
|
|
[Service]
|
|
|
|
|
Type=idle
|
|
|
|
|
WorkingDirectory=/home/yellowtent/box
|
2025-06-17 22:30:34 +02:00
|
|
|
User=yellowtent
|
|
|
|
|
Group=yellowtent
|
2015-09-07 11:18:44 -07:00
|
|
|
Restart=always
|
2020-08-04 09:34:03 -07:00
|
|
|
ExecStart=/home/yellowtent/box/box.js
|
2023-03-29 11:18:44 +02:00
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
2021-03-17 11:10:47 -07:00
|
|
|
; we run commands like df which will parse properly only with correct locale
|
2026-03-12 22:55:28 +05:30
|
|
|
Environment="HOME=/home/yellowtent" "USER=yellowtent" "BOX_ENV=cloudron" "NODE_ENV=production" "LC_ALL=C"
|
2025-06-17 22:30:34 +02:00
|
|
|
; this sends the main process SIGTERM and then if anything lingers to the control-group . this is also the case if the main process crashes.
|
|
|
|
|
; the box code handles SIGTERM and cleanups the tasks
|
|
|
|
|
KillMode=mixed
|
|
|
|
|
KillSignal=SIGTERM
|
|
|
|
|
TimeoutStopSec=5s
|
|
|
|
|
SendSIGKILL=yes
|
2019-01-06 19:16:53 -08:00
|
|
|
; Do not kill this process on OOM. Children inherit this score. Do not set it to -1000 so that MemoryMax can keep working
|
|
|
|
|
OOMScoreAdjust=-999
|
|
|
|
|
MemoryMax=400M
|
2015-12-12 13:14:50 -08:00
|
|
|
StartLimitInterval=1
|
|
|
|
|
StartLimitBurst=60
|
2015-09-07 11:18:44 -07:00
|
|
|
|