LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-25-2008, 02:28 AM   #1
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Rep: Reputation: 38
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?
 
Old 11-25-2008, 04:14 AM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
I put scripts that are run by cron daily in
/etc/cron.daily

and similar logic
 
Old 11-26-2008, 06:30 AM   #3
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Original Poster
Rep: Reputation: 38
Thanks for your reply.
 
Old 11-26-2008, 10:29 AM   #4
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
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.
 
Old 11-26-2008, 04:13 PM   #5
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 109Reputation: 109
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.
 
Old 11-26-2008, 04:29 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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.
 
  


Reply

Tags
bash, script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where do I place startup scripts? trist007 Linux - Newbie 9 08-21-2008 04:59 PM
Can My custom Icons be used in place of default? randell6564 Ubuntu 3 06-20-2006 02:12 PM
custom-made redhat distro srns Red Hat 1 12-15-2004 08:15 PM
Where do you place shutdown scripts? zer0halo Linux - Newbie 3 08-24-2004 03:43 PM
Good place to find scripts? twistedpair Linux - General 3 01-15-2004 01:15 PM


All times are GMT -5. The time now is 09:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration