Running screen with su

/etc/rc.local

screen -d -m /home/mdt/project1/scripts/run_workers.sh

/home/mdt/project1/scripts/run_workers.sh

su mdt -c '/home/mdt/project1/app/console supertag:gearman:run-worker --env=prod 2>&1 | while read line; do echo `/bin/date` "$line" >> /home/mdt/project1/app/logs/worker.log; done'

 

Leave a Reply

Your email address will not be published. Required fields are marked *