[Service]
TimeoutStartSec=5000
ExecStart=/usr/local/bin/tiddlywiki /home/pi/tw5/linux/bacula --server 9094 $:/core/save/all text/plain text/html "" "" %H
User=Tw5
Group=Tw5
[Install]
WantedBy=multi-user.target
When I start it I get the following:
Jun 8 21:16:57 wiki tiddlywiki[1037]: Serving on 127.0.0.1:9094
I was hoping instead that it would bind to the ip of the DNS name (%H) ip but that didn't work either.
I've also tried 0.0.0.0 in the command without any luck.
Thank you,
Andrew J. Leer
[Unit]
WIKI="/home/user/newwiki"PORT="8080"OPTS="$:/core/save/all text/plain text/html"USER=""PWD=""IP="0.0.0.0"
$ cat tw5resume.service.envvars
TW5LOC=/usr/local/bin/tiddlywiki
WIKILOC=/home/pi/tw5/jobhunt/resume
SERVERARG=--server
WIKIPORT=9098
ROOTTID=$:/core/save/all
RENTYPE=text/plain
SRVTYPE=text/html
USRNAME=****
PASSWD=****
HOST=wiki.domain.lan
and then...
[Unit]
Description=resume
After=nginx.service
Requires=nginx.service
[Service]
EnvironmentFile=/home/pi/tw5/jobhunt/resume/tw5resume.service.envvars
TimeoutStartSec=5000
ExecStartPre=-/bin/kill $(/bin/ss --all -p --tcp -4 | /bin/grep $WIKIPORT | /bin/awk '$1 == "LISTEN" {print $6}' | /bin/grep -o -e 'pid=[0-9]*' | /bin/grep -o -e '[0-9]*')
ExecStart=/usr/bin/nodejs $TW5LOC $WIKILOC $SERVERARG $WIKIPORT $ROOTTID $RENTYPE $SRVTYPE $USRNAME $PASSWD %H
ExecStop=/bin/kill $(/bin/ss --all -p --tcp -4 | /bin/grep $WIKIPORT | /bin/awk '$1 == "LISTEN" {print $6}' | /bin/grep -o -e 'pid=[0-9]*' | /bin/grep -o -e '[0-9]*')
User=pi
Group=pi
[Install]
WantedBy=multi-user.target
pi@wiki:~/tw5/jobhunt/resume$ cat /etc/systemd/system/tw5resume.service
[Unit]
Description=resume
After=nginx.service
Requires=nginx.service
[Service]
EnvironmentFile=/home/pi/tw5/jobhunt/resume/tw5resume.service.envvars
TimeoutStartSec=5000
ExecStartPre=-/bin/kill $(/bin/ss --all -p --tcp -4 | /bin/grep 9094 | /bin/awk '$1 == "LISTEN" {print $6}' | /bin/grep -o -e 'pid=[0-9]*' | /bin/grep -o -e '[0-9]*')
ExecStart=/usr/bin/nodejs $TW5LOC $WIKILOC $SERVERARG $WIKIPORT $ROOTTID $RENTYPE $SRVTYPE $USRNAME $PASSWD %H
ExecStop=/bin/kill $(/bin/ss --all -p --tcp -4 | /bin/grep 9094 | /bin/awk '$1 == "LISTEN" {print $6}' | /bin/grep -o -e 'pid=[0-9]*' | /bin/grep -o -e '[0-9]*')
User=pi
Group=pi
[Install]
WantedBy=multi-user.target