No peertube stop script

This commit is contained in:
Bob Mottram 2018-02-09 21:25:44 +00:00
parent f5cea90040
commit abd7011b70
1 changed files with 1 additions and 8 deletions

View File

@ -829,7 +829,7 @@ function install_peertube {
# Hacky stuff to fix runtime errors
sed -i 's|const url_1 = require("url");|const url_1 = require("url").Url;|g' dist/server/helpers/core-utils.js
sed -i 's|const urlObject = new url_1.URL(url);|const urlObject = new url_1(url);|g' dist/server/helpers/core-utils.js
sed -i 's|return urlObject.href.replace(/\/$/, '');|return urlObject.href;|g' dist/server/helpers/core-utils.js
sed -i 's|return urlObject.href.replace.*|return urlObject.href;|g' dist/server/helpers/core-utils.js
PEERTUBE_ONION_HOSTNAME=$(add_onion_service peertube 80 ${PEERTUBE_ONION_PORT})
@ -839,12 +839,6 @@ function install_peertube {
echo 'npm start' >> $PEERTUBE_DIR/start
chmod +x $PEERTUBE_DIR/start
echo '#!/bin/bash' > $PEERTUBE_DIR/stop
echo "cd $PEERTUBE_DIR" >> $PEERTUBE_DIR/stop
echo 'PATH=$(npm bin):$PATH' >> $PEERTUBE_DIR/stop
echo 'npm stop' >> $PEERTUBE_DIR/stop
chmod +x $PEERTUBE_DIR/stop
echo '[Unit]' > /etc/systemd/system/peertube.service
echo 'Description=PeerTube Decentralized video streaming platform' >> /etc/systemd/system/peertube.service
echo 'After=syslog.target' >> /etc/systemd/system/peertube.service
@ -855,7 +849,6 @@ function install_peertube {
echo 'Group=peertube' >> /etc/systemd/system/peertube.service
echo "WorkingDirectory=$PEERTUBE_DIR" >> /etc/systemd/system/peertube.service
echo "ExecStart=$PEERTUBE_DIR/start" >> /etc/systemd/system/peertube.service
echo "ExecStop=$PEERTUBE_DIR/stop" >> /etc/systemd/system/peertube.service
echo 'StandardOutput=syslog' >> /etc/systemd/system/peertube.service
echo 'StandardError=syslog' >> /etc/systemd/system/peertube.service
echo 'SyslogIdentifier=peertube' >> /etc/systemd/system/peertube.service