diff --git a/assets/setup-web.sh b/assets/setup-web.sh index 1a0ae95..edea516 100755 --- a/assets/setup-web.sh +++ b/assets/setup-web.sh @@ -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 + diff --git a/assets/webapp.service b/assets/webapp.service index c28fb12..5455a0e 100644 --- a/assets/webapp.service +++ b/assets/webapp.service @@ -1,3 +1,6 @@ +[Install] +WantedBy=multi-user.target + [Unit] Description=Demo web app @@ -5,4 +8,5 @@ Description=Demo web app ExecStart=/usr/local/bin/webapp >> /var/log/webapp.log IgnoreSIGPIPE=false KillMode=process +Restart=on-failure