LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2016, 04:16 AM   #1
sub320
Member
 
Registered: Jan 2016
Posts: 116

Rep: Reputation: 3
Modify script


deleted

Last edited by sub320; 01-26-2016 at 08:18 PM.
 
Old 01-22-2016, 04:30 AM   #2
huffdad
Member
 
Registered: Jan 2006
Location: Missouri
Distribution: Slackware & LFS
Posts: 31

Rep: Reputation: 6
I would probably add a line right under the /etc/init.d/sshd/restart, but still inside the if ... fi, something like this:
Code:
if {...} then
/etc/init.d/sshd restart
echo "`date` -- sshd restarted"  >> filename.log
fi
 
Old 01-22-2016, 04:33 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,846

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
echo "some message" > /path/to/logfile
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify the script , please help ust Linux - Newbie 14 10-17-2012 11:13 AM
Modify script ust Linux - Newbie 2 05-21-2012 03:57 AM
modify the perl script so that I could apply the script to all the files casualzone Linux - Software 3 05-06-2011 04:23 AM
Modify Perl script to work with txt - Permissions script joangopan Programming 4 09-14-2007 09:20 PM
script to modify url gazman1 Programming 2 06-14-2006 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration