mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 12:10:07 +09:00
Only restart pigpiod if it is running.
This commit is contained in:
parent
0493c7ffe4
commit
d2ee57cb1c
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,6 +1,6 @@
|
|||||||
raspi-config (20170811) stretch; urgency=medium
|
raspi-config (20170811) stretch; urgency=medium
|
||||||
|
|
||||||
* Enable and disable pigpiod daemon with remote access
|
* Only restart pigpio daemon if it is running
|
||||||
|
|
||||||
-- Simon Long <simon@raspberrypi.org> Fri, 11 Aug 2017 14:40:50 +0100
|
-- Simon Long <simon@raspberrypi.org> Fri, 11 Aug 2017 14:40:50 +0100
|
||||||
|
|
||||||
|
12
raspi-config
12
raspi-config
@ -990,19 +990,17 @@ do_rgpio() {
|
|||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=/usr/bin/pigpiod
|
ExecStart=/usr/bin/pigpiod
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl restart pigpiod
|
|
||||||
systemctl enable pigpiod
|
|
||||||
STATUS=enabled
|
STATUS=enabled
|
||||||
elif [ $RET -eq 1 ]; then
|
elif [ $RET -eq 1 ]; then
|
||||||
rm -f /etc/systemd/system/pigpiod.service.d/public.conf
|
rm -f /etc/systemd/system/pigpiod.service.d/public.conf
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl stop pigpiod
|
|
||||||
systemctl disable pigpiod
|
|
||||||
STATUS=disabled
|
STATUS=disabled
|
||||||
else
|
else
|
||||||
return $RET
|
return $RET
|
||||||
fi
|
fi
|
||||||
|
systemctl daemon-reload
|
||||||
|
if systemctl -q is-enabled pigpiod ; then
|
||||||
|
systemctl restart pigpiod
|
||||||
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --msgbox "Remote access to the GPIO server is $STATUS" 20 60 1
|
whiptail --msgbox "Remote access to the GPIO server is $STATUS" 20 60 1
|
||||||
fi
|
fi
|
||||||
@ -1453,7 +1451,7 @@ do_interface_menu() {
|
|||||||
"P5 I2C" "Enable/Disable automatic loading of I2C kernel module" \
|
"P5 I2C" "Enable/Disable automatic loading of I2C kernel module" \
|
||||||
"P6 Serial" "Enable/Disable shell and kernel messages on the serial connection" \
|
"P6 Serial" "Enable/Disable shell and kernel messages on the serial connection" \
|
||||||
"P7 1-Wire" "Enable/Disable one-wire interface" \
|
"P7 1-Wire" "Enable/Disable one-wire interface" \
|
||||||
"P8 GPIO Server" "Enable/Disable remote access to GPIO pins" \
|
"P8 Remote GPIO" "Enable/Disable remote access to GPIO pins" \
|
||||||
3>&1 1>&2 2>&3)
|
3>&1 1>&2 2>&3)
|
||||||
RET=$?
|
RET=$?
|
||||||
if [ $RET -eq 1 ]; then
|
if [ $RET -eq 1 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user