Skip to content

Instantly share code, notes, and snippets.

@jericbas
Last active April 2, 2021 14:25
Show Gist options
  • Save jericbas/3d24f58b8df372c6b9deb048d5077b8f to your computer and use it in GitHub Desktop.
Save jericbas/3d24f58b8df372c6b9deb048d5077b8f to your computer and use it in GitHub Desktop.
Service Linux
[Unit]
Description=Filebrowser Service
After=network.target
[Service]
WorkingDirectory=/data
PIDFile=/var/run/filebrowser.pid
ExecStart=/usr/local/bin/filebrowser --cache-dir cache
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
[Unit]
Description=name
After=network.target
[Service]
#Do not change to "simple"
Type=forking
User=ubuntu
Group=ubuntu
UMask=007
ExecStart=command
Restart=on-failure
[Install]
WantedBy=multi-user.target
# Location: /etc/systemd/system/xxx.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment