#!/bin/bash # Installs and deploys the server # Laminar variables: # - $WEBAPPS: path to webapps home dirs # - $SV_WEB: runsvdir of webapp services app=muse files="static muse covers admin index.html" services="muse muse-covers" set -- $services mkdir -p ${WEBAPPS}/$app sv stop $(printf "${SV_WEB}/%s\n" $@) rm -vr ${WEBAPPS}/$app/* cp -vr ${files} ${WEBAPPS}/$app/ ( cd ${WEBAPPS}/$app/covers && npm update ) sv start $(printf "${SV_WEB}/%s\n" $@)