From 5690132e4c1762ef5b77249308793ab83cca8956 Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Tue, 19 Nov 2024 14:00:20 -1000 Subject: [PATCH] Change default shell with sudo --- resources/scripts/install-services.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) 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