From d2ee57cb1c83113f1381c123f6f84cb0dc26bfc7 Mon Sep 17 00:00:00 2001 From: Simon Long Date: Fri, 11 Aug 2017 15:35:56 +0100 Subject: [PATCH] Only restart pigpiod if it is running. --- debian/changelog | 2 +- raspi-config | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index ea376d2..5877e41 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ raspi-config (20170811) stretch; urgency=medium - * Enable and disable pigpiod daemon with remote access + * Only restart pigpio daemon if it is running -- Simon Long Fri, 11 Aug 2017 14:40:50 +0100 diff --git a/raspi-config b/raspi-config index 1baf061..cb44525 100755 --- a/raspi-config +++ b/raspi-config @@ -990,19 +990,17 @@ do_rgpio() { ExecStart= ExecStart=/usr/bin/pigpiod EOF - systemctl daemon-reload - systemctl restart pigpiod - systemctl enable pigpiod STATUS=enabled elif [ $RET -eq 1 ]; then rm -f /etc/systemd/system/pigpiod.service.d/public.conf - systemctl daemon-reload - systemctl stop pigpiod - systemctl disable pigpiod STATUS=disabled else return $RET fi + systemctl daemon-reload + if systemctl -q is-enabled pigpiod ; then + systemctl restart pigpiod + fi if [ "$INTERACTIVE" = True ]; then whiptail --msgbox "Remote access to the GPIO server is $STATUS" 20 60 1 fi @@ -1453,7 +1451,7 @@ do_interface_menu() { "P5 I2C" "Enable/Disable automatic loading of I2C kernel module" \ "P6 Serial" "Enable/Disable shell and kernel messages on the serial connection" \ "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) RET=$? if [ $RET -eq 1 ]; then