Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Linux systemd #81

Open
zesle opened this issue May 11, 2022 · 3 comments
Open

Not working with Linux systemd #81

zesle opened this issue May 11, 2022 · 3 comments

Comments

@zesle
Copy link

zesle commented May 11, 2022

[Unit]
Description=Golang HTTP Server
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/home/sample.pid
ExecStart=/home/daemon/go-test
ExecReload=/home/daemon/go-test -s reload
ExecStop=/home/daemon/go-test -s stop

KillMode=none
PrivateTmp=false
Restart=on-failure
RestartSec=5

CPUAccounting=false
TasksAccounting=false
MemoryAccounting=false

[Install]
WantedBy=multi-user.target
Alias=gotest.service

@sevlyar
Copy link
Owner

sevlyar commented Jun 25, 2022

Can you provide more information about the issue? What did you do? What did you expect to see? What did you see instead?

@bienkma
Copy link

bienkma commented Jun 8, 2023

I worked fine with configuration below:

[Unit]
Description=LUKS Vault agent
After=network.target auditd.service
Wants=network.target

[Service]
Type=forking
User=root
Group=root
ExecStart=/usr/local/bin/luks-vault
ExecStop=/bin/kill -3 $MAINPID
PIDFile=/run/luks-vault.pid
ExecStartPost=/bin/sleep 1
WorkingDirectory=/usr/local/bin
KillMode=none
PrivateTmp=false
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
Alias=luks-vault.service

@aeliusrs
Copy link

Thank @bienkma, your example work perfectly for me too

@sevlyar I think it worth to be added in the documentation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants