From 6369f9c91ee35aee0713ad1fbaadefd94edf28cb Mon Sep 17 00:00:00 2001 From: Nyan Of The Moon Date: Sun, 30 Sep 2018 16:29:30 -0400 Subject: [PATCH] run --- nu.pid | 0 nu.service | 19 +++++++++++++++++++ run.sh | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 nu.pid create mode 100755 nu.service diff --git a/nu.pid b/nu.pid new file mode 100755 index 0000000..e69de29 diff --git a/nu.service b/nu.service new file mode 100755 index 0000000..36677b1 --- /dev/null +++ b/nu.service @@ -0,0 +1,19 @@ +[Unit] +Description=Nu +After=network.target + +[Service] +Type=forking +ExecStart=/home/pi/Nu/run.sh +ExecStop=/bin/kill -s TERM $MAINPID +PIDFile=/home/pi/Nu/nu.pid +TimeoutStopSec=0 +Restart=always +User=pi +UMask=007 +ReadOnlyDirectories=/ +ReadWriteDirectories=/home/pi/Nu + +[Install] +WantedBy=multi-user.target +Alias=nu.service diff --git a/run.sh b/run.sh index e3d7cc2..a7cc57b 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -clear & python -m nu -v \ No newline at end of file +cd /home/pi/Nu & python3.7 -m nu \ No newline at end of file