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,26 +3,23 @@
# [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; # install source code
if [ $usegit -eq 1 ]; then
test $? -ne 0 && usegit=0; git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \
&& rm /home/sats/satsd/first_install \
|| exit;
# install source code else
if [ "$usegit" -eq 1 ]; then
git clone ssh://smmp-server/satsd/git /home/sats/satsd/source \ # temporary replacement (without git)
&& rm /home/sats/satsd/first_install \ scp -r smmp-server:/satsd/scp/source /home/sats/satsd/ \
|| exit; && rm /home/sats/satsd/first_install \
|| exit;
else 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;