Skip to content

Commit

Permalink
Ensure that webapp starts on reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
topfunky committed Jan 25, 2018
1 parent 58d1b6f commit 124054e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/setup-web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ cp /tmp/assets/webapp /usr/local/bin/
chmod +x /usr/local/bin/*
cp /tmp/assets/webapp.service /lib/systemd/system/webapp.service
service webapp start
systemctl enable webapp

4 changes: 4 additions & 0 deletions assets/webapp.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[Install]
WantedBy=multi-user.target

[Unit]
Description=Demo web app

[Service]
ExecStart=/usr/local/bin/webapp >> /var/log/webapp.log
IgnoreSIGPIPE=false
KillMode=process
Restart=on-failure

0 comments on commit 124054e

Please sign in to comment.