2017-01-26 14:40:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# [1] First install only
|
|
|
|
#========================================================#
|
|
|
|
if [ -e /home/sats/satsd/first_install ]; then
|
|
|
|
|
|
|
|
dpkg -s git 2>/dev/null >/dev/null && gitinstalled=1 || gitinstalled=0;
|
|
|
|
|
|
|
|
# (1) With git if installed #
|
|
|
|
if [ $gitinstalled -eq 1 ]; then
|
|
|
|
|
2017-01-26 15:05:08 +00:00
|
|
|
git clone -b $BRANCH ssh://smmp-server/satsd/git /home/sats/satsd/source \
|
2017-01-26 14:40:45 +00:00
|
|
|
&& rm /home/sats/satsd/first_install \
|
|
|
|
|| exit;
|
|
|
|
|
|
|
|
# (2) Without git installed #
|
|
|
|
else
|
|
|
|
|
|
|
|
# temporary replacement (without git)
|
|
|
|
scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
|
|
|
|
&& rm /home/sats/satsd/first_install \
|
|
|
|
|| exit;
|
|
|
|
fi;
|
|
|
|
|
|
|
|
fi;
|