Update according to new SATS daemon management (multi service)

This commit is contained in:
xdrm-brackets 2017-09-26 18:03:33 +02:00
parent 88d00b4de3
commit ca49e89aa9
5 changed files with 24 additions and 6 deletions

View File

@ -368,6 +368,11 @@ step7(){
echo " - /lib/systemd/system";
sudo cp ./utility/firewall@.service /mnt/lib/systemd/system/firewall@.service;
# (12) Create sats-feature@ service #
echo " (.) Create sats-feature@ service";
echo " - /lib/systemd/system";
sudo cp ./utility/sats-feature@.service /mnt/lib/systemd/system/sats-feature@.service;
# (3) Install services
#--------------------------------------------------------#

View File

@ -13,7 +13,7 @@ export SERVER_HOSTNAME="xdrm.io";
export SERVER_USERNAME="satsd";
# DEFAULT SATS SETTINGS
export MACHINE_ID="126";
export MACHINE_ID="127";
export MACHINE_BRANCH="1.0";
export MACHINE_STATE="000";
export API_URL="https://logauth.xdrm.io/api/machineDefault";

View File

@ -0,0 +1,13 @@
[Unit]
Description=[::SATS::] Feature %i
Requires=sats-sync.service
After=sats-sync.service
[Service]
Type=simple
User=sats
Group=sats
ExecStart=/bin/bash /home/sats/satsd/source/feature/%i/main
[Install]
WantedBy=multi-user.target

View File

@ -6,4 +6,4 @@ if [ ! -e /target/sync ]; then
fi;
# [1] Propagate script to DAEMON
/bin/bash /home/sats/satsd/source/daemon 2>> /home/sats/satsd/log/daemon.log >> /home/sats/satsd/log/daemon.log;
/bin/bash /home/sats/satsd/source/daemon | sudo -u sats tee -a /home/sats/satsd/log/daemon.log;

View File

@ -4,11 +4,11 @@ Requires=sats-sync.service
After=sats-sync.service
[Service]
Type=simple
User=sats
Group=sats
Type=oneshot
RemainAfterExit=yes
User=pi
Group=pi
ExecStart=/bin/sh /service/sats-loop
Restart=always
[Install]
WantedBy=multi-user.target