sudo svc on linux

This commit is contained in:
Bryan MacFarlane
2020-04-15 14:25:11 -04:00
parent 52ff9b4f59
commit 2d97cef1d2
2 changed files with 9 additions and 4 deletions

View File

@@ -126,5 +126,10 @@ sudo -E -u ${svc_user} ./config.sh --unattended --url $runner_url --token $RUNNE
#---------------------------------------
echo
echo "Configuring as a service ..."
./svc.sh install ${svc_user}
./svc.sh start
prefix=""
if [ "${runner_plat}" == "linux" ]; then
prefix="sudo "
fi
${prefix}./svc.sh install ${svc_user}
${prefix}./svc.sh start

View File

@@ -62,6 +62,6 @@ echo $REMOVE_TOKEN
echo
echo "Uninstall the service ..."
pushd ./runner
./svc.sh stop
./svc.sh uninstall
${prefix}./svc.sh stop
${prefix}./svc.sh uninstall
./config.sh remove --token $REMOVE_TOKEN