From 47387c94cbc3abbc7ac8338b86c0c2a357116b07 Mon Sep 17 00:00:00 2001 From: jrtechs Date: Sun, 10 Feb 2019 15:14:45 -0500 Subject: [PATCH] Created a systemd script to launch the program. --- html/videos.html | 5 ----- jrtechsvideos.service | 21 +++++++++++++++++++++ routes/icon.js | 1 - 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 jrtechsvideos.service diff --git a/html/videos.html b/html/videos.html index 37e95c5..2bf73f3 100644 --- a/html/videos.html +++ b/html/videos.html @@ -1,9 +1,4 @@

Videos

- -
-

Videos

-
-
diff --git a/jrtechsvideos.service b/jrtechsvideos.service new file mode 100644 index 0000000..42231d3 --- /dev/null +++ b/jrtechsvideos.service @@ -0,0 +1,21 @@ +# File Location /lib/systemd/system +# +# After file creation run: systemctl daemon-reload +# enable service on start up: systemctl enable jrtechsvideos.service +# start the service: systemctl start jrtechsvideos + + +[Unit] +Description=Videos site for jrtechs +Documentation=https://videos.jrtechs.net +After=network.target + +[Service] +Type=simple +User=jeff +WorkingDirectory=/var/www/video.jrtechs.net/HomeBrewPlex +ExecStart=/bin/bash /var/www/video.jrtechs.net/HomeBrewPlex/run.sh +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/routes/icon.js b/routes/icon.js index 6547715..21505b9 100644 --- a/routes/icon.js +++ b/routes/icon.js @@ -36,7 +36,6 @@ routes.get('/', (request, result) => } else { - console.log("reading ./icon/public/" + name); file = fs.readFileSync("./icon/public/" + name); }