Author Topic: how to make crontab auto restart ZNC like psybnc?  (Read 7168 times)

otromen

  • Mini Mewbie
  • *
  • Posts: 1
how to make crontab auto restart ZNC like psybnc?
« on: April 16, 2011, 10:29:33 AM »
hello can you help me. how to make auto crontab for ZNC like your web?  *:-{


hxxp://mewbies.com/how_to_install_psybnc_tutorial.htm
« Last Edit: April 16, 2011, 10:31:11 AM by otromen »

mewbies

  • Administrator
  • Hero Mewbie
  • *****
  • Posts: 133
    • Mewbies
Re: how to make crontab auto restart ZNC like psybnc?
« Reply #1 on: June 19, 2013, 02:00:01 PM »
Hi otromen. I haven't used ZNC but I would 'think' it couldn't be much different than setting up a contrab like you would for another program, then test if it works.
Go here: http://wiki.znc.in/FAQ then search 'cron' and it explains how:

How can I restart ZNC automatically (in case of a machine reboot, crash, etc.)?

Add a cron entry to execute ZNC regularly. If there is already one copy of ZNC running on a particular config file, new copies won't be spawned. Example cron entry:

Code: [Select]
*/10 * * * *   /home/you/znc/bin/znc >/dev/null 2>&1
This will check if ZNC is running every 10 minutes. If you load a module (like away) that needs user input to run, you can add the input to the LoadModule line in your config file (ie. LoadModule = away yourpassword).

If you're using Vixie's cron, you can start it on start-up like this.

 
Code: [Select]
@reboot your_username /home/you/znc/bin/znc >/dev/null 2>&1
If you have a question; do NOT PM me, post it for all to help.

faustino

  • Guest
Re: how to make crontab auto restart ZNC like psybnc?
« Reply #2 on: October 22, 2018, 01:44:41 PM »

file zncchk

crontab  */5 * * * * /home/vale/.znc/zncchk > /dev/null 2>&1
pidfile in ${HOME}/.znc/znc.pid

#!/bin/sh
cmd="znc"
pidfile="${HOME}/.znc/znc.pid"

echo $pidfile


Lasakato

  • Mini Mewbie
  • *
  • Posts: 1
Re: how to make crontab auto restart ZNC like psybnc?
« Reply #3 on: December 13, 2018, 11:13:52 AM »
I'm very happy to get this information because I'm looking for this information.