diff --git a/clone/utility/sats-dwc@.service b/clone/utility/sats-dwc@.service index 887816a..13561ba 100644 --- a/clone/utility/sats-dwc@.service +++ b/clone/utility/sats-dwc@.service @@ -1,9 +1,8 @@ [Unit] Description=[::SATS::] Dynamic Wireless Credentials (%i) -Wants=network.target -Before=network.target +Requires=network-online.target BindsTo=sys-subsystem-net-devices-%i.device -After=sys-subsystem-net-devices-%i.device +After=sys-subsystem-net-devices-%i.device network-online.target [Service] Type=oneshot diff --git a/clone/utility/sats-install.service b/clone/utility/sats-install.service index 1aed882..a419f56 100644 --- a/clone/utility/sats-install.service +++ b/clone/utility/sats-install.service @@ -1,6 +1,6 @@ [Unit] Description=[::SATS::] Install Process -Requires=sats-dwc@wlan0.service sats-boot.service network-online.target +Requires=sats-boot.service sats-dwc@wlan0.service After=sats-boot.service sats-dwc@wlan0.service [Service] @@ -8,4 +8,5 @@ Type=oneshot RemainAfterExit=yes User=pi Group=pi -ExecStart=/bin/bash /service/sats-install \ No newline at end of file +ExecStart=/bin/bash /service/sats-install +ExecStartPost=/usr/bin/sudo systemctl stop sats-dwc@wlan0.service \ No newline at end of file diff --git a/clone/utility/sats-update b/clone/utility/sats-update index bd70f8e..d4463cc 100644 --- a/clone/utility/sats-update +++ b/clone/utility/sats-update @@ -6,4 +6,4 @@ if [ ! -e /target/sync ]; then fi; # [1] Propagate script to UPDATE -/bin/bash /home/sats/satsd/source/update 2>> /home/sats/satsd/log/update.log >> /home/sats/satsd/log/update.log; +sudo -u sats /bin/bash /home/sats/satsd/source/update | sudo -u sats tee -a /home/sats/satsd/log/update.log > /dev/null; diff --git a/clone/utility/sats-update.service b/clone/utility/sats-update.service index 6644147..6284511 100644 --- a/clone/utility/sats-update.service +++ b/clone/utility/sats-update.service @@ -1,11 +1,12 @@ [Unit] Description=[::SATS::] Update Process -Requires=sats-dwc@wlan0.service network-online.target +Requires=sats-dwc@wlan0.service After=sats-dwc@wlan0.service Requisite=sats-sync.service [Service] Type=oneshot -User=sats -Group=sats -ExecStart=/bin/bash /service/sats-update \ No newline at end of file +User=pi +Group=pi +ExecStart=/bin/bash /service/sats-update +ExecStartPost=/usr/bin/sudo systemctl stop sats-dwc@wlan0.service \ No newline at end of file