29 lines
795 B
Plaintext
29 lines
795 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# [1] first install (install source code)
|
||
|
if [ -e /home/sats/satsd/first_install ]; then
|
||
|
|
||
|
usegit=1;
|
||
|
git > /dev/null 2> /dev/null || usegit=0;
|
||
|
|
||
|
# install source code
|
||
|
if [ $usegit -eq 1 ]; then
|
||
|
|
||
|
git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \
|
||
|
&& rm /home/sats/satsd/first_install \
|
||
|
|| exit;
|
||
|
|
||
|
else
|
||
|
|
||
|
# temporary replacement (without git)
|
||
|
scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
|
||
|
&& rm /home/sats/satsd/first_install \
|
||
|
|| exit;
|
||
|
fi;
|
||
|
|
||
|
fi;
|
||
|
|
||
|
|
||
|
# [2] Propagate script
|
||
|
sh /home/sats/satsd/source/boot $* 2>> /home/sats/satsd/log/boot.log >> /home/sats/satsd/log/boot.log;
|