1

So 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 this 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 execute /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?

thanks for you time and effort

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.