linux command

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
jan_sc
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 3:10 am

linux command

Post by jan_sc »

hi,

i'm new to linux and have a question on the linux command. what does the "restart" means in the command line "./program-name restart"?

tia.

cheers.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Depends on the application you're using... consult it's manual.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'll guest you're talking about daemons:

Code: Select all

/etc/rc.d/apache2 restart
That basically tells whatever service it handles to "stop" and then "start".
jan_sc
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 3:10 am

Post by jan_sc »

hi,

unfortunately, there's no manual available. here is my scenario:
i had made some changes to the php files but the changes were not reflecting in the internet browser. then, i found out that there are 4 web servers running the same application and i saw the command "./program-name restart" was written somewhere with a brief description "to sync all files to all servers". i suppose i need to execute that command but wasn't sure of the impact and just afraid so as it is a production server and running 24x7.

any helps are very much appreciated.

tia.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I understand that your not to keen to run the application (since you have no clue about what it's going to do)... But if you were us, how would you expect us to know the application 'program-name'?

Thus, unless you give more information about the application (probably it's just a wrapper script for a couple of commands...) we won't be able to help you...
jan_sc
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 3:10 am

Post by jan_sc »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi,

thanks for your input timvw. just got to know the command "more" to diplay file content. this is the content:

[syntax="bash"]case "$1" in
boot)
        echo -n "Cleaning up PRODUCTION tmp files........................."
        rm -f /tmp/rdist.lck
        rm -f /tmp/rdist.log
        echo "[OK]"
        exit 0;
        ;;

restart)
        $0 boot
        ;;
*)
        echo "Usage: ./sync_production [boot|restart]"
        exit 1
esac


if [ -f /tmp/rdist.lck ]; then
        exit 0
fi


/bin/touch /tmp/rdist.lck

/usr/bin/rdist -p /usr/sbin/rdistd -oremove,nochkgroup,nochkmode,nochkowner -f /
root/sync-production.conf

rm -f /tmp/rdist.lck

echo `date` > /tmp/rdist.log

exit 0
tia.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
jan_sc
Forum Newbie
Posts: 8
Joined: Wed Aug 01, 2007 3:10 am

Post by jan_sc »

sorry. missed out the content of sync-production.conf

Code: Select all

HOSTS = (root@ap01 root@ap02 root@ap03 root@ap04)

FILES = (/usr/local/apache/htdocs/production)
EXCEPT = (/usr/local/apache/htdocs/production/temp)

${FILES} -> ${HOSTS}
        install ;
        except ${EXCEPT} ;
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

So, the important command is (the rest is simply creating of lock and log files)

/usr/bin/rdist -p /usr/sbin/rdistd -oremove,nochkgroup,nochkmode,nochkowner -f /root/sync-production.conf


(So consult man rdist)
Post Reply