diff --git a/roles/live2dev/templates/cron.j2 b/roles/live2dev/templates/cron.j2 index cab448e7cae29a47f1240b55acf519e86e58babe..28ebb713675b9950c080b960cd09271ee366cb08 100644 --- a/roles/live2dev/templates/cron.j2 +++ b/roles/live2dev/templates/cron.j2 @@ -1,5 +1,12 @@ #!/bin/bash +if [[ "${USER}" != "{{ item }}" ]]; then + echo "This script should be run as {{ item }}, please sudo first" + echo "sudo -u {{ item }} -s /bin/bash" + echo "${0}" + exit +fi + cd ~/sites GIT_PULL=$(git pull | grep -v "up-to-date")