|
|
|
|
829
|
# Hacky stuff to fix runtime errors
|
829
|
# Hacky stuff to fix runtime errors
|
830
|
sed -i 's|const url_1 = require("url");|const url_1 = require("url").Url;|g' dist/server/helpers/core-utils.js
|
830
|
sed -i 's|const url_1 = require("url");|const url_1 = require("url").Url;|g' dist/server/helpers/core-utils.js
|
831
|
sed -i 's|const urlObject = new url_1.URL(url);|const urlObject = new url_1(url);|g' dist/server/helpers/core-utils.js
|
831
|
sed -i 's|const urlObject = new url_1.URL(url);|const urlObject = new url_1(url);|g' dist/server/helpers/core-utils.js
|
832
|
- sed -i 's|return urlObject.href.replace(/\/$/, '');|return urlObject.href;|g' dist/server/helpers/core-utils.js
|
|
|
|
|
832
|
+ sed -i 's|return urlObject.href.replace.*|return urlObject.href;|g' dist/server/helpers/core-utils.js
|
833
|
|
833
|
|
834
|
PEERTUBE_ONION_HOSTNAME=$(add_onion_service peertube 80 ${PEERTUBE_ONION_PORT})
|
834
|
PEERTUBE_ONION_HOSTNAME=$(add_onion_service peertube 80 ${PEERTUBE_ONION_PORT})
|
835
|
|
835
|
|
|
|
|
|
839
|
echo 'npm start' >> $PEERTUBE_DIR/start
|
839
|
echo 'npm start' >> $PEERTUBE_DIR/start
|
840
|
chmod +x $PEERTUBE_DIR/start
|
840
|
chmod +x $PEERTUBE_DIR/start
|
841
|
|
841
|
|
842
|
- echo '#!/bin/bash' > $PEERTUBE_DIR/stop
|
|
|
843
|
- echo "cd $PEERTUBE_DIR" >> $PEERTUBE_DIR/stop
|
|
|
844
|
- echo 'PATH=$(npm bin):$PATH' >> $PEERTUBE_DIR/stop
|
|
|
845
|
- echo 'npm stop' >> $PEERTUBE_DIR/stop
|
|
|
846
|
- chmod +x $PEERTUBE_DIR/stop
|
|
|
847
|
-
|
|
|
848
|
echo '[Unit]' > /etc/systemd/system/peertube.service
|
842
|
echo '[Unit]' > /etc/systemd/system/peertube.service
|
849
|
echo 'Description=PeerTube Decentralized video streaming platform' >> /etc/systemd/system/peertube.service
|
843
|
echo 'Description=PeerTube Decentralized video streaming platform' >> /etc/systemd/system/peertube.service
|
850
|
echo 'After=syslog.target' >> /etc/systemd/system/peertube.service
|
844
|
echo 'After=syslog.target' >> /etc/systemd/system/peertube.service
|
|
|
|
|
855
|
echo 'Group=peertube' >> /etc/systemd/system/peertube.service
|
849
|
echo 'Group=peertube' >> /etc/systemd/system/peertube.service
|
856
|
echo "WorkingDirectory=$PEERTUBE_DIR" >> /etc/systemd/system/peertube.service
|
850
|
echo "WorkingDirectory=$PEERTUBE_DIR" >> /etc/systemd/system/peertube.service
|
857
|
echo "ExecStart=$PEERTUBE_DIR/start" >> /etc/systemd/system/peertube.service
|
851
|
echo "ExecStart=$PEERTUBE_DIR/start" >> /etc/systemd/system/peertube.service
|
858
|
- echo "ExecStop=$PEERTUBE_DIR/stop" >> /etc/systemd/system/peertube.service
|
|
|
859
|
echo 'StandardOutput=syslog' >> /etc/systemd/system/peertube.service
|
852
|
echo 'StandardOutput=syslog' >> /etc/systemd/system/peertube.service
|
860
|
echo 'StandardError=syslog' >> /etc/systemd/system/peertube.service
|
853
|
echo 'StandardError=syslog' >> /etc/systemd/system/peertube.service
|
861
|
echo 'SyslogIdentifier=peertube' >> /etc/systemd/system/peertube.service
|
854
|
echo 'SyslogIdentifier=peertube' >> /etc/systemd/system/peertube.service
|