LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Place for custom made system scripts (http://www.linuxquestions.org/questions/linux-general-1/place-for-custom-made-system-scripts-685910/)

the_gripmaster 11-25-2008 02:28 AM

Place for custom made system scripts
 
I have written some scripts which are run by cron at various times of the day. The scripts perform some system related activities. I have placed the scripts at /root. Is there any convention/standard for placing custom written system scripts elsewhere in the filesystem?

aus9 11-25-2008 04:14 AM

I put scripts that are run by cron daily in
/etc/cron.daily

and similar logic

the_gripmaster 11-26-2008 06:30 AM

Thanks for your reply.

mesiol 11-26-2008 10:29 AM

Hi,

to meet the filesystem standard you best place the scripts in /usr/local/bin or /usr/local/sbin and create a link in /etc/cron.daily.

This also provides an easy way what to backup in kind of reinstallation or system change.

lumak 11-26-2008 04:13 PM

personally I hate the concept of /usr/local. To me /usr/local is for those that don't want to bother with proper installation of packages.

On the other hand. If you have several computers that all pull their base system from NFS then /usr/local makes some sense to customizing each machine. On the other hand of that hand though, storage space is cheap. Unless your computer is really old, you probably arn't going to be doing that set up for a home network.

billymayday 11-26-2008 04:29 PM

I put individual user's cron scripts in ~/cron, and common ones in /home/cron. The reason I put the common ones there is they get caught by my backup procedures, whereas I don't want to be backing up /usr/bin.


All times are GMT -5. The time now is 09:06 AM.