From 01fd4456ea9275435bcd673f2c3a31734c658ea7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 18 Dec 2017 13:06:05 +0000 Subject: [PATCH] Change wiki working directory #69 --- src/freedombone-app-fedwiki | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-fedwiki b/src/freedombone-app-fedwiki index e126f942..985ee466 100755 --- a/src/freedombone-app-fedwiki +++ b/src/freedombone-app-fedwiki @@ -346,6 +346,11 @@ function install_fedwiki { exit 5293524 fi + if [ ! -d /usr/local/lib/node_modules/wiki ]; then + echo $'wiki directory not found /usr/local/lib/node_modules/wiki' + exit 6285324 + fi + FEDWIKI_ONION_HOSTNAME=$(add_onion_service fedwiki 80 ${FEDWIKI_ONION_PORT}) echo '[Unit]' > /etc/systemd/system/fedwiki.service @@ -356,7 +361,7 @@ function install_fedwiki { echo '[Service]' >> /etc/systemd/system/fedwiki.service echo 'User=fedwiki' >> /etc/systemd/system/fedwiki.service echo 'Group=fedwiki' >> /etc/systemd/system/fedwiki.service - echo "WorkingDirectory=$FEDWIKI_DATA" >> /etc/systemd/system/fedwiki.service + echo "WorkingDirectory=/usr/local/lib/node_modules/wiki" >> /etc/systemd/system/fedwiki.service echo "ExecStart=/usr/local/bin/wiki --data $FEDWIKI_DATA -p $FEDWIKI_PORT" >> /etc/systemd/system/fedwiki.service echo 'StandardOutput=syslog' >> /etc/systemd/system/fedwiki.service echo 'StandardError=syslog' >> /etc/systemd/system/fedwiki.service