diff --git a/start.sh b/start.sh new file mode 100755 index 00000000..7e4489f4 --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/bin/bash +export NVM_DIR="/home/shoofle/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +cd /var/www/theforest.shoofle.net +cd server +npm start diff --git a/the-forest.service b/the-forest.service new file mode 100644 index 00000000..dfaeed3f --- /dev/null +++ b/the-forest.service @@ -0,0 +1,12 @@ +[Unit] +Description=api for the forest wikimud + +[Service] +WorkingDirectory=/var/www/theforest.shoofle.net +ExecStart=/var/www/theforest.shoofle.net/start.sh +Type=simple +Restart=always +RestartSec=10 + +[Install] +WantedBy=basic.target