2017-01-25 18:52:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-05-08 17:06:43 +00:00
|
|
|
# [0] Check synced first
|
2017-05-08 17:04:30 +00:00
|
|
|
if [ ! -e /target/sync ]; then
|
2017-05-08 14:22:11 +00:00
|
|
|
exit 1;
|
2017-01-26 12:50:56 +00:00
|
|
|
fi;
|
|
|
|
|
2017-09-27 14:10:50 +00:00
|
|
|
# [1] Override permissions if not
|
|
|
|
sudo chown sats:pi /home/sats/satsd/source;
|
|
|
|
sudo chown sats:pi /home/sats/satsd/source/daemon;
|
|
|
|
sudo chown -R sats:pi /home/sats/satsd/log/;
|
|
|
|
|
|
|
|
sudo chmod 750 /home/sats/satsd/source;
|
|
|
|
sudo chmod 750 /home/sats/satsd/source/daemon;
|
|
|
|
sudo chmod -R 770 /home/sats/satsd/log/;
|
|
|
|
|
|
|
|
|
|
|
|
# [2] Propagate script to DAEMON
|
2017-09-26 16:03:33 +00:00
|
|
|
/bin/bash /home/sats/satsd/source/daemon | sudo -u sats tee -a /home/sats/satsd/log/daemon.log;
|