1

I have unison running thru a config file by default. In here it applies the wait=watch function so it syncs automatically. But I wanted to run unison on boot, but I haven't been able to do this.

There were some other links, but they didn't gave me an answer.

Things I tried:

Applying (with proper rights) unison to /etc/rc.d/rc.local and specifying the absolute path. Basicly: /usr/local/bin/unison & when I executed /etc/rc.d/rc.local or /etc/rc.local manually, everything works like a charm.

Applying to cron by doing: crontab -e, and than @restart /usr/local/bin/unison &

writing a (working) .sh script that executes unison and putting this in rc.local or cron.

I also applied it to chkconfig with rights 2345 (yes it's listed when running chkconfig --list-all)

I'm running out of ideas. Could anyone help me?

1 Answer 1

2

create a sh script:

nano unisonMonitor.sh

#! /bin/bash

su – root -c /usr/local/bin/unison default &

make it executable with 

chmod +x unisonMonitor.sh

cd /etc/rc.d

nano rc.local

#! /bin/bash

touch /var/lock/subsys/local
sleep 6
/unisonMonitor.sh

chmod u+x


systemctl restart rc-local
systemctl status rc-local


reboot

login → ps aux | grep unison

This eventually worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .