Code: Select all
sudo nano /etc/init.d/btsyncboot
Code: Select all
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsyncboot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start btsync at boot time
# Description: Start btsync at boot time.
### END INIT INFO
USER=root
HOME=/root
export USER HOME
case "$1" in
start)
echo "Starting btsync"
/home/pi/.btsync/btsync --config /home/pi/.btsync/sync.conf
;;
stop)
echo "Stopping btsync"
/home/pi/.btsync/btsync -kill
;;
*)
echo "Usage: /etc/init.d/btsyncboot {start|stop}"
exit 1
;;
esac
exit 0
Code: Select all
sudo chmod 755 btsyncboot
Code: Select all
sudo update-rc.d btsyncboot defaults
cd /media/external
and got this error message
Code: Select all
-bash: cd: external/: Permission denied
So I'm not sure what happened, but I'm assuming it has something to do with me messing around in the init.d scripts.
Can anyone point out where I went wrong, and how to fix it?
Thanks!