LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-20-2013, 04:41 PM   #1
pedrocab
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Rep: Reputation: Disabled
Smile cron -> openvpn service restart


Greetings community!

I would like to change the server.conf of openvpn service once every day, so i though of a simple crontab entry, but it didn't worked yet.

I tried at root's crontab to stop & start it at 2 a.m.
Code:
0 2 * * * service openvpn stop && service openvpn start <server>
and some other varies. could you help me through?

Last edited by pedrocab; 12-20-2013 at 05:24 PM.
 
Old 12-20-2013, 04:50 PM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
Originally Posted by pedrocab View Post
Greetings community!

I gathered some very basic linux skills through setting up an raspberry pi as openvpn router. i would like to change the server.conf once every day, so i though of a simple crontab entry, but it didn't worked yet.

I tried at root's crontab to stop & start it at 2 a.m.
Code:
0 2 * * * service openvpn stop && service openvpn start <server>
and some other varies. could you help me through?
i think this mite work:
Code:
0 2 * * *  /sbin/service openvpn restart
 
Old 12-20-2013, 05:10 PM   #3
pedrocab
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks a lot for the quick response, this didnt worked as well but brought me to the idea of /etc/init.d/openvpn restart, which worked.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron service and oracle service stopped unexpectedly. Can't restart oracle. camron Linux - Newbie 6 06-10-2010 07:00 PM
Inactivity timeout (--ping-restart) in OpenVpn ajayan Linux - Newbie 3 04-27-2010 07:36 AM
Inactivity timeout (--ping-restart) in OpenVpn ajayan Linux - Newbie 1 04-21-2010 12:45 PM
Cannot ping OpenVPN client after server restart skubik Linux - Networking 3 10-15-2007 02:42 PM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 12:24 PM


All times are GMT -5. The time now is 12:21 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration