diff options
author | James Meyer <james.meyer@operamail.com> | 2010-09-19 20:47:04 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-09-19 20:47:04 (GMT) |
commit | 33768edd59d7b87b593345338c00fc56854f5e71 (patch) | |
tree | 09b8f3dcb743168c4e8cc536b131f162a971bcfe /abs/core-testing/cups/cups | |
parent | cc6b7ee11973de2d095d47249804bbf79b9f8870 (diff) | |
download | linhes_pkgbuild-33768edd59d7b87b593345338c00fc56854f5e71.zip linhes_pkgbuild-33768edd59d7b87b593345338c00fc56854f5e71.tar.gz linhes_pkgbuild-33768edd59d7b87b593345338c00fc56854f5e71.tar.bz2 |
cups: added cups pkg (this includes libcups)
Diffstat (limited to 'abs/core-testing/cups/cups')
-rwxr-xr-x | abs/core-testing/cups/cups | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/abs/core-testing/cups/cups b/abs/core-testing/cups/cups new file mode 100755 index 0000000..4afaf5a --- /dev/null +++ b/abs/core-testing/cups/cups @@ -0,0 +1,38 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/cupsd` +case "$1" in + start) + stat_busy "Starting CUPS Daemon" + [ -z "$PID" ] && /usr/sbin/cupsd + if [ $? -gt 0 ]; then + stat_fail + else + echo $(pidof -o %PPID -x /usr/sbin/cupsd) > /var/run/cups.pid + add_daemon cups + stat_done + fi + ;; + stop) + stat_busy "Stopping CUPS Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm /var/run/cups.pid + rm_daemon cups + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |