setup/clone/utility/sats-loop

19 lines
517 B
Plaintext
Raw Permalink Normal View History

#!/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
exit 1;
2017-01-26 12:50:56 +00:00
fi;
# [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
/bin/bash /home/sats/satsd/source/daemon | sudo -u sats tee -a /home/sats/satsd/log/daemon.log;