summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyanJMC2021-06-23 20:43:10 -0300
committerShyanJMC2021-06-23 20:43:10 -0300
commitec3533051a30427c0f1f7b06f59a6bf31077e6e8 (patch)
tree635a3ad69e2b5509a4602ca6fc96c2d565a0bdaf
downloadaur-ec3533051a30427c0f1f7b06f59a6bf31077e6e8.tar.gz
First release. Added cups.
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD17
-rw-r--r--cupsd.initd44
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..91e5ceb5ac5e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = openrc-init_scripts
+ pkgdesc = A compilation of init scripts for OpenRC sysinit.
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://shyanjmc.com
+ arch = any
+ license = GPL
+ depends = openrc
+ source = cupsd.initd
+ sha256sums = SKIP
+
+pkgname = openrc-init_scripts
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9e5d413b5b2a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Joaquin "ShyanJMC" Crespo <joaquincrespo96@gmail.com> <shyan@shyanjmc.com>
+
+pkgname=openrc-init_scripts
+pkgver=1.0
+pkgrel=1
+pkgdesc="A compilation of init scripts for OpenRC sysinit."
+arch=('any')
+url="https://shyanjmc.com"
+license=('GPL')
+depends=('openrc')
+source=('cupsd.initd')
+sha256sums=('SKIP')
+
+package(){
+ mkdir -p $pkgdir/etc/init.d/
+ cp cupsd.initd $pkgdir/etc/init.d/
+}
diff --git a/cupsd.initd b/cupsd.initd
new file mode 100644
index 000000000000..ff0998784269
--- /dev/null
+++ b/cupsd.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+
+name="CUPS"
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+description_checkconfig="Test the configuration file"
+description_reload="Reload"
+
+: ${cfgfile:="/etc/cups/cupsd.conf"}
+
+command="/usr/sbin/cupsd"
+command_args="-f -c $cfgfile"
+command_background="yes"
+
+pidfile="/run/cups/$RC_SVCNAME.pid"
+
+depend() {
+ use net
+ before nfs
+ need dbus
+ after logger
+}
+
+checkconfig() {
+ $command $command_args -t >/dev/null 2>&1 \
+ || $command $command_args -t
+}
+
+start_pre() {
+ checkconfig || return 1
+
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss
+ checkpath -q -d -m 0755 -o root:lp /run/cups
+ checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs
+}
+
+reload() {
+ ebegin "Reloading $name"
+ start-stop-daemon --signal HUP --pidfile "$pidfile"
+ eend $?
+}