diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-07-20 13:59:53 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-07-20 14:00:34 +0000 |
commit | 396be1be08687df19db556f9ad2c4b50b70a3fcf (patch) | |
tree | 9ab63feb471ca15739959e7f7d6498dec9e7a710 /main/bacula | |
parent | a01e506e04855eb6b3a0589cfeeba667b49b575d (diff) | |
download | aports-396be1be08687df19db556f9ad2c4b50b70a3fcf.tar.bz2 aports-396be1be08687df19db556f9ad2c4b50b70a3fcf.tar.xz |
main/bacula$: rewrite init scripts
Diffstat (limited to 'main/bacula')
-rw-r--r-- | main/bacula/APKBUILD | 26 | ||||
-rw-r--r-- | main/bacula/bacula-dir-conf | 7 | ||||
-rw-r--r-- | main/bacula/bacula-dir-init | 23 | ||||
-rw-r--r-- | main/bacula/bacula-dir.initd | 21 | ||||
-rw-r--r-- | main/bacula/bacula-fd-conf | 4 | ||||
-rw-r--r-- | main/bacula/bacula-fd-init | 22 | ||||
-rw-r--r-- | main/bacula/bacula-fd.initd | 21 | ||||
-rw-r--r-- | main/bacula/bacula-sd-conf | 7 | ||||
-rw-r--r-- | main/bacula/bacula-sd-init | 22 | ||||
-rw-r--r-- | main/bacula/bacula-sd.initd | 20 |
10 files changed, 70 insertions, 103 deletions
diff --git a/main/bacula/APKBUILD b/main/bacula/APKBUILD index 0f21a801d0..91449449a5 100644 --- a/main/bacula/APKBUILD +++ b/main/bacula/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=bacula pkgver=7.4.7 -pkgrel=2 +pkgrel=3 pkgdesc="Enterprise ready, network based backup program" url="http://www.bacula.org" arch="all" @@ -17,12 +17,9 @@ pkgusers="bacula" pkggroups="bacula" somask="libbaccats-$pkgver.so" source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz - bacula-dir-init - bacula-dir-conf - bacula-sd-init - bacula-sd-conf - bacula-fd-init - bacula-fd-conf + bacula-dir.initd + bacula-sd.initd + bacula-fd.initd bacula-7.4.0-path-mounted.patch " options="!check" #no test suite provided @@ -78,10 +75,8 @@ package() { make DESTDIR="$pkgdir" install local daemon; for daemon in dir sd fd; do - install -Dm755 "$srcdir"/$pkgname-${daemon}-init \ + install -Dm755 "$srcdir"/$pkgname-${daemon}.initd \ "$pkgdir"/etc/init.d/$pkgname-${daemon} - install -Dm644 "$srcdir"/$pkgname-${daemon}-conf \ - "$pkgdir"/etc/conf.d/$pkgname-${daemon} done install -Dm644 examples/sample-query.sql \ @@ -163,23 +158,18 @@ libs() { client() { pkgdesc="Bacula client" mkdir -p "$subpkgdir"/usr/sbin \ - "$subpkgdir"/etc/conf.d \ "$subpkgdir"/etc/init.d \ "$subpkgdir"/etc/$pkgname for bin in $pkgname $pkgname-fd bconsole btraceback; do mv "$pkgdir"/usr/sbin/$bin "$subpkgdir"/usr/sbin done - mv "$pkgdir"/etc/conf.d/$pkgname-fd "$subpkgdir"/etc/conf.d mv "$pkgdir"/etc/init.d/$pkgname-fd "$subpkgdir"/etc/init.d mv "$pkgdir"/etc/$pkgname/$pkgname-fd.conf "$subpkgdir"/etc/$pkgname/ install -d -o $pkgname -g $pkgname "$subpkgdir"/$_bworkdir } sha512sums="2dcffe3f02de8e7dedc11f58aeca58fb95486757579065564753376d3fab7699d7577c189d0d34f8490706d773cd6a95d42ef1f35facb95e6fff10dad085c0d0 bacula-7.4.7.tar.gz -852df12c6555ad65661345e15872ca75b99a9d3e5b9e6ed80d82021006c9716a04919dabe88ff672aa550ac0b00b31eaa2e739469557fc326e6bb4216e2308b9 bacula-dir-init -e06e5f8821d4a9a3f40cc8f11feeb5004780b82e2ad5e645f69a0f8faff78d8a8c6e66b36e105619b2a78d6b2f294dedd0e00e9bbf568af201cf299387135fef bacula-dir-conf -ee8a9206d3e604f5ac81bc70bece97ec77dae87b463a6ff4d08fba9418bf37e99a30895f115b2e9fbba1ec5f92b5d9368fd155717fedae12792f255b02413208 bacula-sd-init -80f6cf74cc14e722747d92e6e7b073bdf32456d395c6b4b63daa1ddcaf75f3d76d1b9a0e8e2da512e8f82e4d59a4a93cc38117af91d974fe7db644516bdb9909 bacula-sd-conf -e4c09734ccf9e1ac197ac4684c8294dddae817cf764b168ce7357b2529d11314f948ed2807d501b3c7cd7725ba488981fe573d7b389fca7feedfa9c8a1cce6fa bacula-fd-init -ff312e8952b31de27f22b257d12b570e151794d985f854ff19bab34363ea974d7583edced6b125518da3ecfe2b2a229b732473958b10484d988fcc8a67a372cc bacula-fd-conf +7e5e164d891896b11b9a4eb8cf7a3ffc8d20aef01296df998d64aba3f1ad82c9537aaa94ef18d4b4a60c794192a484ae5358fba7885a2dbc812bd45f551a7fdd bacula-dir.initd +de86166300aae2a76764f2ba316d713960525e944f8cdb76ce53cda779d3d60d6e88663de2fe1a461018a258b9d35523ad7e1a6d4695566c1d183f224b4181fe bacula-sd.initd +bc573ef44e0b4729631190b3cd8b7209266cb31b2c37f874b75184a4044cd6a8bf6f42adbcb2c5e215690cbb1e8045c1c04700853d66b9706bef815543d1250a bacula-fd.initd 2d3757236aacca421261a8866ff04b5b0151538e1462559bd1240119b1bece1d456acbba9fee86dbc6aaec7af2a52eb2c0b7490c5f371b7deb478731c74342ff bacula-7.4.0-path-mounted.patch" diff --git a/main/bacula/bacula-dir-conf b/main/bacula/bacula-dir-conf deleted file mode 100644 index 17a56161f0..0000000000 --- a/main/bacula/bacula-dir-conf +++ /dev/null @@ -1,7 +0,0 @@ -# Config file for /etc/init.d/bacula-dir - -# Options for the director daemon. -# The DIR can be run as a non-root user, however -# please ensure that this user has proper permissions to -# access your backup devices. -DIR_OPTIONS="-u bacula -g bacula -c /etc/bacula/bacula-dir.conf" diff --git a/main/bacula/bacula-dir-init b/main/bacula/bacula-dir-init deleted file mode 100644 index ee20f52a5c..0000000000 --- a/main/bacula/bacula-dir-init +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-dir-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $ - -depend() { - need net - after firewall - use dns bacula-fd bacula-sd postgresql mariadb -} - -start() { - ebegin "Starting bacula director" - start-stop-daemon --start --quiet --exec /usr/sbin/bacula-dir \ - -- ${DIR_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping bacula director" - start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-dir.*.pid - eend $? -} diff --git a/main/bacula/bacula-dir.initd b/main/bacula/bacula-dir.initd new file mode 100644 index 0000000000..31af7372e1 --- /dev/null +++ b/main/bacula/bacula-dir.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +: ${port:=9101} +: ${conf:=/etc/bacula/bacula-dir.conf} +: ${exec_user:=bacula} +: ${exec_group:=bacula} + +name="Bacula Director" +command="/usr/sbin/$RC_SVCNAME" +command_args="-u $exec_user -g $exec_group -c $conf" +pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid" + +depend() { + need net + use dns +} + +start_pre() { + checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula +} + diff --git a/main/bacula/bacula-fd-conf b/main/bacula/bacula-fd-conf deleted file mode 100644 index 033ef74b4b..0000000000 --- a/main/bacula/bacula-fd-conf +++ /dev/null @@ -1,4 +0,0 @@ -# Config file for /etc/init.d/bacula-fd - -# Options for the file daemon. -FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf" diff --git a/main/bacula/bacula-fd-init b/main/bacula/bacula-fd-init deleted file mode 100644 index 1e36a19479..0000000000 --- a/main/bacula/bacula-fd-init +++ /dev/null @@ -1,22 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-fd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $ - -depend() { - need net - use dns -} - -start() { - ebegin "Starting bacula file daemon" - start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \ - -- ${FD_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping bacula file daemon" - start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-fd.*.pid - eend $? -} diff --git a/main/bacula/bacula-fd.initd b/main/bacula/bacula-fd.initd new file mode 100644 index 0000000000..8f3930b8ee --- /dev/null +++ b/main/bacula/bacula-fd.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +: ${port:=9102} +: ${conf:=/etc/bacula/bacula-fd.conf} +: ${exec_user:=root} +: ${exec_group:=root} + +name="Bacula File Daemon" +command="/usr/sbin/$RC_SVCNAME" +command_args="-u $exec_user -g $exec_group -c $conf" +pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid" + +depend() { + need net + use dns +} + +start_pre() { + checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula +} + diff --git a/main/bacula/bacula-sd-conf b/main/bacula/bacula-sd-conf deleted file mode 100644 index 88e13aa0eb..0000000000 --- a/main/bacula/bacula-sd-conf +++ /dev/null @@ -1,7 +0,0 @@ -# Config file for /etc/init.d/bacula-sd - -# Options for the storage daemon. -# The SD can be run as a non-root user, however -# please ensure that this user has proper permissions to -# access your backup devices. -SD_OPTIONS="-u bacula -g bacula -c /etc/bacula/bacula-sd.conf" diff --git a/main/bacula/bacula-sd-init b/main/bacula/bacula-sd-init deleted file mode 100644 index 2375b8e457..0000000000 --- a/main/bacula/bacula-sd-init +++ /dev/null @@ -1,22 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/app-backup/bacula/files/3.0.3/bacula-sd-init,v 1.1 2009/11/08 17:14:46 wschlich Exp $ - -depend() { - need net - use dns -} - -start() { - ebegin "Starting bacula storage daemon" - start-stop-daemon --start --quiet --exec /usr/sbin/bacula-sd \ - -- ${SD_OPTIONS} - eend $? -} - -stop() { - ebegin "Stopping bacula storage daemon" - start-stop-daemon --stop --quiet --pidfile /var/run/bacula/bacula-sd.*.pid - eend $? -} diff --git a/main/bacula/bacula-sd.initd b/main/bacula/bacula-sd.initd new file mode 100644 index 0000000000..42f99dbe4f --- /dev/null +++ b/main/bacula/bacula-sd.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run + +: ${port:=9103} +: ${conf:=/etc/bacula/bacula-dir.conf} +: ${exec_user:=bacula} +: ${exec_group:=bacula} + +name="Bacula Storage Daemon" +command="/usr/sbin/$RC_SVCNAME" +command_args="-u $exec_user -g $exec_group -c $conf" +pidfile="/var/run/bacula/$RC_SVCNAME.$port.pid" + +depend() { + need net + use dns +} + +start_pre() { + checkpath -d -m 0775 -o ${exec_user}:${exec_group} /var/run/bacula +} |