-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
pkgbase = bareos-scripts | ||
pkgver = 0.0.1 | ||
pkgrel = 1 | ||
url = https://github.com/snuglinux/bareos-scripts | ||
install = bareos-scripts.install | ||
arch = any | ||
license = GPL2 | ||
depends = python2-bareos | ||
source = https://github.com/snuglinux/bareos-scripts/archive/0.0.1.zip | ||
md5sums = 6c306a419c41a8eeaa75744bba00fe73 | ||
|
||
pkgname = bareos-scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pkgname="bareos-scripts" | ||
pkgver=0.0.1 | ||
pkgrel=1 | ||
arch=('any') | ||
url="https://github.com/snuglinux/${pkgname}" | ||
license=('GPL2') | ||
depends=("python2-bareos") | ||
source=("https://github.com/snuglinux/${pkgname}/archive/${pkgver}.zip") | ||
md5sums=('6c306a419c41a8eeaa75744bba00fe73') | ||
install=${pkgname}.install | ||
|
||
package(){ | ||
cd "$srcdir/${pkgname}-${pkgver}" | ||
|
||
# Create folders | ||
install -d "${pkgdir}/usr/bin" | ||
install -d "${pkgdir}/usr/share/doc/${pkgname}" | ||
install -d "${pkgdir}/usr/share/licenses/${pkgname}" | ||
install -d "${pkgdir}/etc/bareos/" | ||
install -d "${pkgdir}/etc/systemd/system/[email protected]" | ||
install -d "${pkgdir}/usr/lib/systemd/system" | ||
|
||
# Copy files | ||
install -m644 bareos-scripts.conf "${pkgdir}"/etc/bareos/bareos-scripts.conf | ||
install -m644 systemd/[email protected]/bareos-incoming-connect.conf \ | ||
"${pkgdir}"/etc/systemd/system/[email protected]/bareos-incoming-connect.conf | ||
install -m644 systemd/bareos-incoming-connect@.{service,timer} \ | ||
"${pkgdir}"/usr/lib/systemd/system/ | ||
|
||
install -m644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README" | ||
install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | ||
install -m755 "bareos-incoming-connect" "${pkgdir}/usr/bin" | ||
#sed -e "s/CURRENT_VERSION=0.0.0/CURRENT_VERSION=${pkgver}/" -i "${pkgdir}/usr/bin/${pkgname}" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
USER=bareos | ||
GROUP=bareos | ||
|
||
pre_install() { | ||
# Create User/Group | ||
getent group ${GROUP} > /dev/null || groupadd --system ${GROUP} | ||
getent passwd ${USER} > /dev/null || useradd --system --gid ${USER} --home-dir /dev/null --shell /sbin/nologin --no-create-home ${USER} | ||
} | ||
|
||
post_install() { | ||
chown -R ${USER}:${GROUP} /etc/bareos/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters