diff --git a/resources/scripts/install-services.sh b/resources/scripts/install-services.sh index c504e9beb..ce0a24ac1 100644 --- a/resources/scripts/install-services.sh +++ b/resources/scripts/install-services.sh @@ -2,20 +2,16 @@ PANUSER="${PANUSER:-panoptes}" -function install_services() { - echo "Installing supervisor services." +echo "Installing supervisor services." - # Make supervisor read our conf file at its current location. - echo "files = ${HOME}/conf_files/pocs-supervisord.conf" | sudo tee -a /etc/supervisor/supervisord.conf +# Make supervisor read our conf file at its current location. +echo "files = ${HOME}/conf_files/pocs-supervisord.conf" | sudo tee -a /etc/supervisor/supervisord.conf - # Change the user and home directory. - sed -i "s/chown=panoptes:panoptes/chown=${PANUSER}:${PANUSER}/g" "${HOME}/conf_files/pocs-supervisord.conf" - sed -i "s/user=panoptes/user=${PANUSER}/g" "${HOME}/conf_files/pocs-supervisord.conf" - sed -i "s|/home/panoptes|${HOME}|g" "${HOME}/conf_files/pocs-supervisord.conf" +# Change the user and home directory. +sed -i "s/chown=panoptes:panoptes/chown=${PANUSER}:${PANUSER}/g" "${HOME}/conf_files/pocs-supervisord.conf" +sed -i "s/user=panoptes/user=${PANUSER}/g" "${HOME}/conf_files/pocs-supervisord.conf" +sed -i "s|/home/panoptes|${HOME}|g" "${HOME}/conf_files/pocs-supervisord.conf" - # Reread the supervisord conf and restart. - sudo supervisorctl reread - sudo supervisorctl update -} - -install_services +# Reread the supervisord conf and restart. +sudo supervisorctl reread +sudo supervisorctl update