diff --git a/clone/clone b/clone/clone index 6531651..dcdb732 100755 --- a/clone/clone +++ b/clone/clone @@ -306,14 +306,17 @@ step9(){ sudo mkdir -p /mnt/home/sats/satsd/source; sudo mkdir -p /mnt/home/sats/satsd/log; sudo mkdir -p /mnt/home/sats/satsd/conf; + sudo mkdir -p /mnt/home/sats/satsd/data; sudo touch /mnt/home/sats/satsd/first_install; # (2) Create default configuration files # echo " (.) Create default configuration/log files"; - echo $DEFAULT_BRANCH | sudo tee /mnt/home/sats/satsd/conf/branch > /dev/null; - echo $MACHINE_ID | sudo tee /mnt/home/sats/satsd/conf/id > /dev/null; - - echo "" | sudo tee /mnt/home/sats/satsd/log/access.log > /dev/null; + echo $MACHINE_STATE | sudo tee /mnt/home/sats/satsd/conf/machine.state > /dev/null; + echo $API_URL | sudo tee /mnt/home/sats/satsd/conf/api.url > /dev/null; + echo $MACHINE_BRANCH | sudo tee /mnt/home/sats/satsd/conf/machine.branch > /dev/null; + echo $MACHINE_ID | sudo tee /mnt/home/sats/satsd/conf/machine.id > /dev/null; + echo "" | sudo tee /mnt/home/sats/satsd/conf/auth.list > /dev/null; + echo $MACHINE_SECRET | sudo tee /mnt/home/sats/satsd/conf/machine.secret > /dev/null; # (3) Set up SATS botting script # diff --git a/clone/clone.conf b/clone/clone.conf index 913dc43..562f0bd 100755 --- a/clone/clone.conf +++ b/clone/clone.conf @@ -9,5 +9,8 @@ export SERVER_HOSTNAME="xdrm.io"; export SERVER_USERNAME="satsd"; # DEFAULT SATS SETTINGS -export DEFAULT_BRANCH="1.0"; export MACHINE_ID=$(date +%s); +export MACHINE_BRANCH="1.0"; +export MACHINE_STATE="STOP"; +export API_URL="http://192.168.0.43/logauth/api/machineDefault/sync/"; +export MACHINE_SECRET=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 250); diff --git a/clone/utility/install-source b/clone/utility/install-source index 8cc36fe..62d8d93 100644 --- a/clone/utility/install-source +++ b/clone/utility/install-source @@ -6,7 +6,7 @@ if [ -e /home/sats/satsd/first_install ]; then dpkg -s git 2>/dev/null >/dev/null && gitinstalled=1 || gitinstalled=0; - BRANCH=$(cat /home/sats/satsd/conf/branch); + BRANCH=$(cat /home/sats/satsd/conf/machine.branch); # (1) With git if installed # if [ $gitinstalled -eq 1 ]; then