aboutsummaryrefslogtreecommitdiff
blob: 7641b0ef6590496554f637eb6208921941346ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Install]
WantedBy=multi-user.target

[Unit]
Description=IIPImage server
After=network.target
Documentation=https://iipimage.sourceforge.io man:iipsrv(8)

[Service]
User=iipsrv
Group=iipsrv

Environment="HOST=0.0.0.0" "PORT=9000" "LOGFILE=/var/log/iipsrv.log"
EnvironmentFile=-/etc/default/iipsrv

# Make sure logfile is writable by our user
ExecStartPre=+/bin/sh -ec "if [[ ${LOGFILE} != syslog ]]; then /usr/bin/touch -a ${LOGFILE} && chown iipsrv:iipsrv ${LOGFILE}; fi"

ExecStart=/usr/sbin/iipsrv --bind ${HOST}:${PORT}
ExecReload=kill -HUP $MAINPID
Restart=on-failure