3 ms·
Poor man's solution: echo 'pidof myapp > /dev/null || su appuser -c "myapp --arguments" &' > ~/check_services.sh echo 'exit 0' >> ~/check_services.sh
by mappu 14y ago
Poor man's solution:
echo 'pidof myapp > /dev/null || su appuser -c "myapp --arguments" &' > ~/check_services.sh
echo 'exit 0' >> ~/check_services.sh
chmod 700 ~/check_services.sh
#Add ~/check_services.sh & to /etc/rc.local for startup
#Add */1 * * * /root/check_services.sh to crontab
- stfp 14y agoInteresting hack, sure, but "poor man solutions" would be interesting if "rich man solutions" cost too much. That is not the case here. For someone that can understand this, runit will take < 10 minutes to learn.