Updated and fixed boot script

This commit is contained in:
xdrm-brackets 2017-01-25 17:29:28 +01:00
parent 5f1dda283b
commit e7c43aee91
4 changed files with 16 additions and 19 deletions

BIN
clone/.clone.swp Normal file

Binary file not shown.

View File

@ -241,7 +241,7 @@ step7(){
# (8) Set up automatic ssh server at start up # # (8) Set up automatic ssh server at start up #
echo " (.) Emulate \`systemctl enable ssh.service\`"; echo " (.) Emulate \`systemctl enable ssh.service\`";
#sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/ssh.service; sudo ln -fs /lib/systemd/system/ssh.service /mnt/etc/systemd/system/sshd.service;
# (9) Define config alias with ssh-key # # (9) Define config alias with ssh-key #
echo " (.) Define alias config"; echo " (.) Define alias config";

View File

@ -6,4 +6,4 @@ export WIFI_PASS=" manon adrien ";
# SERVER SETTINGS # SERVER SETTINGS
export SERVER_HOSTNAME="xdrm.io"; export SERVER_HOSTNAME="xdrm.io";
export SERVER_USERNAME="gw"; export SERVER_USERNAME="satsd";

View File

@ -3,27 +3,24 @@
# [1] first install (install source code) # [1] first install (install source code)
if [ -e /home/sats/satsd/first_install ]; then if [ -e /home/sats/satsd/first_install ]; then
git 2> /dev/null > /dev/null; usegit=1;
git > /dev/null 2> /dev/null || usegit=0;
usegit=1;
test $? -ne 0 && usegit=0; # install source code
if [ $usegit -eq 1 ]; then
# install source code git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \
if [ "$usegit" -eq 1 ]; then && rm /home/sats/satsd/first_install \
|| exit;
git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \
&& rm /home/sats/satsd/first_install \
|| exit;
else else
# temporary replacement (without git)
scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
&& rm /home/sats/satsd/first_install \
|| exit;
fi;
# temporary replacement (without git)
scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
&& rm /home/sats/satsd/first_install \
|| exit;
fi;
fi; fi;