Created
November 24, 2016 17:10
-
-
Save ensonic/749d259f48302a2ed5b480c6e3a28930 to your computer and use it in GitHub Desktop.
systemd startup script for open-roberta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /lib/systemd/system/ora.service | |
[Unit] | |
Description=OpenRoberta Lab Server | |
After=network.target | |
[Service] | |
ExecStartPre=/usr/bin/touch /var/log/ora.log | |
ExecStartPre=/bin/chown pi: /var/log/ora.log | |
ExecStartPre=/sbin/iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 1999 | |
ExecStart=/bin/bash -c '/opt/robertalab/ora.sh --start-server >/var/log/ora.log 2>&1' | |
WorkingDirectory=/opt/robertalab | |
StandardOutput=inherit | |
StandardError=inherit | |
PermissionsStartOnly=true | |
Restart=always | |
User=pi | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment