Update as a oneshot service

This commit is contained in:
xdrm-brackets 2017-01-28 12:21:45 +01:00
parent d6d7cfc6c8
commit ccaa3a6cf5
3 changed files with 14 additions and 4 deletions

View File

@ -253,9 +253,10 @@ step7(){
sudo chown 1000:1000 /mnt/home/pi/sats-boot;
sudo chmod 770 /mnt/home/pi/sats-boot;
#echo " (.) Emulate \`systemctl enable sats-boot\`";
#sudo ln -fs /lib/systemd/system/sats-boot.service /mnt/etc/systemd/system/multi-user.target.wants/sats-boot.service;
# (3) Install sats-boot service #
echo " (.) Create sats-update service";
echo " - /lib/systemd/system";
sudo cp ./utility/sats-update.service /mnt/lib/systemd/system/sats-update.service;
echo "<<< done";

View File

@ -17,4 +17,4 @@ iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
up /bin/sh /home/sats/satsd/sats-loop update;
up /bin/sh systemctl start sats-update.service

View File

@ -0,0 +1,9 @@
[Unit]
Description=SATS Update Process
Requires=network-online.target network.target sats-loop.service sats-boot.service
[Service]
Type=oneshot
User=sats
Group=sats
ExecStart=/bin/sh /home/sats/satsd/sats-loop update