Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6140

How to change the PIDFILE location of cron?

$
0
0

My question is clear, I want the crond.pid file, which is created by the cron daemon, to be located in /data/storage/ instead of the default /var/run/ directory inside my docker container. I am switching to a safe user in the end of my Dockerfile, which is based on the latest Ubuntu. This is causing permission problems when running cron afterwards and I want all my .pid files, created by any container in the same location and accessible when viewing my projects files.

I have not found any configuration file from cron to modify the PIDFILE variable other than the cron file itself located in /etc/init.d/. One possibility could be to exchange this file with a custom version and restart the service, but I want to know if there is a perhaps better and more maintainable solution to this.

Thank you for your time


Viewing all articles
Browse latest Browse all 6140

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>