From: Michael Tremer Date: Sun, 11 Nov 2018 18:57:55 +0000 (+0000) Subject: shairport-sync: Add install/uninstall scripts X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fshairport-sync;p=people%2Fms%2Fipfire-2.x.git shairport-sync: Add install/uninstall scripts These scripts will install symlinks to start the service at boot time. Signed-off-by: Michael Tremer --- diff --git a/src/paks/shairport-sync/install.sh b/src/paks/shairport-sync/install.sh new file mode 100644 index 0000000000..dafd25c8c8 --- /dev/null +++ b/src/paks/shairport-sync/install.sh @@ -0,0 +1,37 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +extract_files +restore_backup ${NAME} + +# create startlinks +ln -sf ../init.d/shairport-sync /etc/rc.d/rc0.d/K20shairport-sync +ln -sf ../init.d/shairport-sync /etc/rc.d/rc3.d/S99shairport-sync +ln -sf ../init.d/shairport-sync /etc/rc.d/rc6.d/K20shairport-sync + +# Start the service. +start_service --background ${NAME} + +exit 0 diff --git a/src/paks/shairport-sync/uninstall.sh b/src/paks/shairport-sync/uninstall.sh new file mode 100644 index 0000000000..51c35a748c --- /dev/null +++ b/src/paks/shairport-sync/uninstall.sh @@ -0,0 +1,32 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME} +make_backup ${NAME} +remove_files + +# Remove all start links. +rm -rf /etc/rc.d/rc*.d/*shairport-sync + +exit 0 diff --git a/src/paks/shairport-sync/update.sh b/src/paks/shairport-sync/update.sh new file mode 100644 index 0000000000..c6485bf0ae --- /dev/null +++ b/src/paks/shairport-sync/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh + +./uninstall.sh +./install.sh