[update] |(1)| dwc is now stopped by its users (sats-install/sats-update)

This commit is contained in:
xdrm-brackets 2017-07-25 12:04:50 +02:00
parent dfc8fb3da1
commit 8b6a075edc
4 changed files with 11 additions and 10 deletions

View File

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

View File

@ -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
ExecStart=/bin/bash /service/sats-install
ExecStartPost=/usr/bin/sudo systemctl stop sats-dwc@wlan0.service

View File

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

View File

@ -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
User=pi
Group=pi
ExecStart=/bin/bash /service/sats-update
ExecStartPost=/usr/bin/sudo systemctl stop sats-dwc@wlan0.service