fix: set unit with type notify
This commit is contained in:
12
files/sbin/gitea_web_notify
Normal file
12
files/sbin/gitea_web_notify
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Display commands, exit on error and enable job control
|
||||
set -xem
|
||||
|
||||
gitea web &
|
||||
until curl --fail --head http://localhost:3000
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
systemd-notify --ready
|
||||
fg %1
|
||||
@@ -4,13 +4,14 @@ After=network.target postgresql.service valkey.service
|
||||
|
||||
[Service]
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
Type=notify
|
||||
User=gitea
|
||||
Group=gitea
|
||||
WorkingDirectory=/var/lib/gitea/
|
||||
Environment=USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea
|
||||
ExecStart=/usr/sbin/gitea web
|
||||
Environment=GITEA_WORK_DIR=/var/lib/gitea
|
||||
ExecStart=/usr/sbin/gitea_web_notify
|
||||
Restart=always
|
||||
NotifyAccess=all
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user