diff --git a/clone/.clone.swp b/clone/.clone.swp deleted file mode 100644 index e539ed3..0000000 Binary files a/clone/.clone.swp and /dev/null differ diff --git a/clone/clone b/clone/clone index 0e02f36..23489c4 100755 --- a/clone/clone +++ b/clone/clone @@ -181,7 +181,7 @@ step7(){ test ! -e ./server/authorized_keys && touch ./server/authorized_keys; cat ./tmp/id_ecdsa.pub >> ./server/authorized_keys; - # (3) Create ssh file system # +# (3) Create ssh file system # echo " (.) Init ssh folder (/home/sats/.ssh)"; sudo mkdir -p /mnt/home/sats/.ssh; @@ -209,7 +209,7 @@ step7(){ # (8) Set up automatic ssh server at start up # 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/ssh.service; # (9) Define config alias with ssh-key # echo " (.) Define alias config"; @@ -289,7 +289,7 @@ step10(){ # (4) Enable startup service unit # echo " (.) Emulate \`systemctl enable sats.service\`"; sudo mkdir -p /mnt/etc/systemd/system/multi-user.target.wants; - sudo ln -fs /lib/systemd/system/sats.service /mnt/etc/systemd/system/multi-user.target.wants/sats.service; + #sudo ln -fs /lib/systemd/system/sats.service /mnt/etc/systemd/system/multi-user.target.wants/sats.service; # (5) Adjust permissions # echo " (.) Adjust permissions"; diff --git a/clone/utility/booting_script b/clone/utility/booting_script index bbf174e..31cd024 100644 --- a/clone/utility/booting_script +++ b/clone/utility/booting_script @@ -3,13 +3,29 @@ # [1] first install (install source code) if [ -e /home/sats/satsd/first_install ]; then - # install source code - git clone ssh://smmp-server/satsd /home/sats/satsd/source \ - && rm /home/sats/satsd/first_install \ - || exit; + git 2> /dev/null > /dev/null; + + usegit=1; -fi + test $? -ne 0 && 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 $*; +sh /home/sats/satsd/source/boot $* 2>> /home/sats/satsd/log/boot.log >> /home/sats/satsd/log/boot.log; diff --git a/clone/utility/shadow_append b/clone/utility/shadow_append index 3578688..92b3855 100644 --- a/clone/utility/shadow_append +++ b/clone/utility/shadow_append @@ -1,2 +1,3 @@ pi:$6$k0vFWRoG$bEBdFcFBWw2fLEA.5LsVKOtLWdWSkZMnEikqOG4jHCneRrWEBnEt6.ROe60ggdA7DbdU.l2ZO35WFvi3q6Ays/:17130:0:99999:7::: -sats:$6$NvC.M5Yz$IRr1rOWhgSQNstmaZK9VLHJzqHebJaEBDaro8M6WyeWQjdLyas4cg5qDwziTVLBC9CI22sPGY.us8saZW0xMl0:17185:0:999999:7:: +sats:$6$k0ddNARW$TDcFuts/WK62gt5QIlFCqN.4MSwj4Q3SsJZ6tUvcbjZXjt2TsiVdkkv9PgO/0yR.on8.Aj2/.WHHU28GXwdo51:17185:0:999999:7:: +