We need to create a startup script so that btsync will always run in the background.
Create a new file in /etc/init.d/btsync, and type in the following code. You need
to check the start directory and make sure that it's owned by the users that you used
while you were logged in.
Create a new file in /etc/init.d/btsync, and type in the following code. You need
to check the start directory and make sure that it's owned by the users that you used
while you were logged in.
#! /bin/shThen, change the permission of the file and register it to run at boot.
# /etc/init.d/btsync
#
# Carry out specific functions when asked to by the system
case "$1" in
start)
/home/root/.btsync/btsync
;;
stop)
killall btsync
;;
*)
echo "Usage: /etc/init.d/btsync {start|stop}"
exit 1
;;
esac
exit 0
sudo chmod 755 /etc/init.d/btsync
sudo /etc/init.d/btsync start # test that the script starts
sudo /etc/init.d/btsync stop # test that the script stops
sudo update-rc.d btsync defaults
No comments:
Post a Comment