Change wiki working directory #69

This commit is contained in:
Bob Mottram 2017-12-18 13:06:05 +00:00
parent 396ac49f00
commit 01fd4456ea
1 changed files with 6 additions and 1 deletions

View File

@ -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