diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube index 4659d2c0..82414e11 100755 --- a/src/freedombone-app-peertube +++ b/src/freedombone-app-peertube @@ -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