Skip to content

Commit 8d328fd

Browse files
committed
chore: add example systemd service unit
1 parent 78b357f commit 8d328fd

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

conf/systemd/etc/ghfs.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--root /data
2+
--hide lost+found
3+
--access-log /var/log/ghfs/access.log
4+
--error-log /var/log/ghfs/error.log
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=Go http file server
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
ExecStart=/usr/local/bin/ghfs --config=/etc/ghfs.conf
8+
ExecReload=/bin/kill -s HUP $MAINPID
9+
KillSignal=SIGTERM
10+
KillMode=process
11+
12+
[Install]
13+
WantedBy=multi-user.target
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[Unit]
2+
Description=Go http file server
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
ExecStart=/usr/local/bin/ghfs --config=/etc/ghfs_%I.conf
8+
ExecReload=/bin/kill -s HUP $MAINPID
9+
KillSignal=SIGTERM
10+
KillMode=process
11+
12+
[Install]
13+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)