Updated config with new file structure : log|data|conf|source + configured default configuration file

This commit is contained in:
xdrm-brackets 2017-01-28 11:42:16 +01:00
parent 938cf48792
commit fe98aba616
3 changed files with 12 additions and 6 deletions

View File

@ -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 #

View File

@ -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);

View File

@ -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