Skip to content

Commit

Permalink
Change default shell with sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
wtgee committed Nov 20, 2024
1 parent 74b7b82 commit 5690132
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions resources/scripts/install-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5690132

Please sign in to comment.