diff --git a/clone/clone b/clone/clone index e21210e..980d88f 100755 --- a/clone/clone +++ b/clone/clone @@ -213,6 +213,13 @@ step7(){ echo " (.) Emulate \`systemctl enable 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"; + echo "Host\tsmmp-server\n\tHostname\t$SERVER_HOSTNAME\n\tUser\t$SERVER_USERNAME\n\tIdentityFile\t~/.ssh/id_ecdsa\n" | sudo tee /mnt/home/sats/.ssh/config > /dev/null; + sudo chown 666:666 /mnt/home/sats/.ssh/config; + sudo chmod 444 /mnt/home/sats/.ssh/config; + + echo "<<< done"; @@ -265,18 +272,18 @@ step10(){ echo "\n>>> [10] Set up SATS daemon"; + # (1) Create daemon folder # echo " (.) Create daemon folder"; - sudo mkdir -p /home/sats/satsd; + sudo mkdir -p /mnt/home/sats/satsd; # (2) Init git repository with ssh url # echo " (.) Clone git repo with server's ssh url"; - sudo git clone --depth=1 ssh://gw@xdrm.io/home/gw/satsd /home/sats/satsd; + sudo git clone --depth=1 ssh://smmp-server/home/gw/satsd /mnt/home/sats/satsd; # (3) Set up git pull with good key # echo " (.) Set up \`git pull\` with registered ssh key"; - git pull origin master; - + cd /mnt/home/sats/git pull origin master; echo "<<< done"; diff --git a/clone/clone.conf b/clone/clone.conf index 85e4ec4..2a1420b 100644 --- a/clone/clone.conf +++ b/clone/clone.conf @@ -2,3 +2,7 @@ # WIFI SETTINGS export WIFI_SSID="freeboxma"; export WIFI_PASS=" manon adrien "; + +# SERVER SETTINGS +export SERVER_HOSTNAME="xdrm.io"; +export SERVER_USERNAME="gw";