Skip to content

Commit 124054e

Browse files
committed
Ensure that webapp starts on reboot
1 parent 58d1b6f commit 124054e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

assets/setup-web.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ cp /tmp/assets/webapp /usr/local/bin/
44
chmod +x /usr/local/bin/*
55
cp /tmp/assets/webapp.service /lib/systemd/system/webapp.service
66
service webapp start
7+
systemctl enable webapp
8+

assets/webapp.service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
[Install]
2+
WantedBy=multi-user.target
3+
14
[Unit]
25
Description=Demo web app
36

47
[Service]
58
ExecStart=/usr/local/bin/webapp >> /var/log/webapp.log
69
IgnoreSIGPIPE=false
710
KillMode=process
11+
Restart=on-failure
812

0 commit comments

Comments
 (0)