diff --git a/Makefile b/Makefile index 5969bda..be904be 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE=a2pi -VERSION=0.1.0 +VERSION=0.1.1 DIST=$(PACKAGE)-$(VERSION) DISTDIR=./$(DIST) diff --git a/debian/changelog b/debian/changelog index 21c7986..8f305a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +a2pi (0.1.1-2) unstable; urgency=low + + * Add user 'pi' to group 'fuse' + + -- David Schmenk Sun, 22 Sep 2013 15:16:00 -0700 + +a2pi (0.1.1-1) unstable; urgency=low + + * Clean up daemon restart code + + -- David Schmenk Sun, 22 Sep 2013 15:00:00 -0700 + +a2pi (0.1.0-4) unstable; urgency=low + + * Remove hard-coded path in a2mount + + -- David Schmenk Sun, 22 Sep 2013 14:32:30 -0700 + a2pi (0.1.0-3) unstable; urgency=low * Fix for daemon start diff --git a/debian/init.d b/debian/init.d index 3463f7e..faf98ea 100755 --- a/debian/init.d +++ b/debian/init.d @@ -63,20 +63,21 @@ do_stop() # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 + #start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + #RETVAL="$?" + #[ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 + #start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + #[ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" + #rm -f $PIDFILE + #return "$RETVAL" + killall $NAME } # diff --git a/debian/postinst b/debian/postinst index 27ee698..f8a9415 100755 --- a/debian/postinst +++ b/debian/postinst @@ -46,10 +46,15 @@ case "$1" in cp /usr/share/a2pi/11-joy.conf /usr/share/X11/xorg.conf.d fi # + # Add default Pi user,pi, to groups fuse and input + # + addgroup pi fuse + # addgroup pi input # already there by default + # # Add schmenk.is-a-geek.com to apt sources # if [ "$(grep schmenk /etc/apt/sources.list)" = "" ] ; then - echo "deb http://schmenk.is-a-geek.com/raspbian wheezy contrib extra" >> /etc/apt/sources.list + echo "deb http://schmenk.is-a-geek.com/raspbian wheezy contrib" >> /etc/apt/sources.list fi # # Remove old install diff --git a/src/a2pid.c b/src/a2pid.c index 526dd63..077d38a 100755 --- a/src/a2pid.c +++ b/src/a2pid.c @@ -637,6 +637,8 @@ void main(int argc, char **argv) /* * Add signal handlers. */ + if (signal(SIGTERM, sig_bye) == SIG_ERR) + die("signal"); if (signal(SIGINT, sig_bye) == SIG_ERR) die("signal"); if (signal(SIGHUP, sig_bye) == SIG_ERR)