-
Notifications
You must be signed in to change notification settings - Fork 7
/
bowerbird.service
26 lines (21 loc) · 1.05 KB
/
bowerbird.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# INSTRUCTIONS: this file must be moved into place manually when setting up your hosting environment:
# /etc/systemd/system/bowerbird.service
# if using bowerbird WITHOUT NGINX as a proxy, you will need to
# (a) change the ExecStart line to the one that specifies port 80 (bowerbird.py is configured for 8080 by default)
# (b) make sure everything in /usr/bowerbird is owned by 'root'
# (c) uncomment the "[Socket]" and "Listenstream" lines at the end of this file
[Unit]
Description=Bowerbird App
Documentation=man:SimpleHTTPServer(1)
[Service]
Type=simple
WorkingDirector=/usr/bowerbird
Group=bowerbird # this is optional - you need to create the group manually
Umask=002 # this is optional - it helps manage the files via group permissions
ExecStart=/usr/bin/python3 app/bowerbird.py > status/bb_log.txt 2>&1 &
# ExecStart=/usr/bin/python3 app/bowerbird.py -port 80 > status/bb_log.txt 2>&1 &
ExecStop=/bin/kill `/bin/ps aux | /bin/grep bowerbird | /bin/grep -v grep | /usr/bin/awk '{ print $2 }'`
[Install]
WantedBy=multi-user.target
# [Socket]
# ListenStream=80