Update as a oneshot service
This commit is contained in:
parent
d6d7cfc6c8
commit
ccaa3a6cf5
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue