Skip to content

Commit

Permalink
do not install init script
Browse files Browse the repository at this point in the history
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
  • Loading branch information
freemangordon committed Mar 11, 2023
1 parent fd82691 commit bc0b187
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions debian/maemo-launcher.maintscript
@@ -0,0 +1 @@
rm_conffile /etc/init.d/maemo-launcher 0.38.3~ maemo-launcher
25 changes: 13 additions & 12 deletions debian/maemo-launcher.postinst
Expand Up @@ -3,22 +3,23 @@
set -e

# Reload the launcher binary from disk while preserving the current state
# on upgrade (except when installing or upgrading from an old version).
if [ "$1" = configure ] && [ -x "/etc/init.d/maemo-launcher" ]; then
if dpkg --compare-versions "$2" lt-nl 0.27-1; then
action=start
else
action=reload
# on upgrade.
if [ "$1" = configure ]; then
pidof -q maemo-launcher && launcher_running=true
if [ x$launcher_running = xtrue ]; then
echo restarting daemon...
kill -USR1 `pidof maemo-launcher`
fi

if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d maemo-launcher $action || exit $?
else
/etc/init.d/maemo-launcher $action || exit $?
fi
update-rc.d maemo-launcher remove >/dev/null
fi

#DEBHELPER#

exit 0
# We must do it here, dpkg-maintscript-helper should have already removed the
# init script
if [ "$1" = configure ]; then
update-rc.d maemo-launcher remove >/dev/null
fi

exit 0
8 changes: 2 additions & 6 deletions debian/maemo-launcher.prerm
Expand Up @@ -2,12 +2,8 @@

set -e

if [ -x "/etc/init.d/maemo-launcher" ] && [ "$1" = remove ]; then
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d maemo-launcher stop || exit $?
else
/etc/init.d/maemo-launcher stop || exit $?
fi
if [ "$1" = remove ] && [ `pidof -q maemo-launcher` ] ; then
kill -TERM `pidof maemo-launcher`
fi

#DEBHELPER#
Expand Down
3 changes: 0 additions & 3 deletions debian/rules
Expand Up @@ -40,9 +40,6 @@ override_dh_auto_install:
cp debian/dh_maemolauncher debian/tmp/usr/bin
cp debian/dh_maemolauncher.1 debian/tmp/usr/share/man/man1/

override_dh_installinit:
dh_installinit --no-start

override_dh_fixperms:
dh_fixperms
chmod u+s debian/maemo-launcher/usr/lib/*/maemo-launcher/defender

0 comments on commit bc0b187

Please sign in to comment.