First check in

This commit is contained in:
2018-07-26 19:28:35 -05:00
commit f18fb25272
7 changed files with 163 additions and 0 deletions

5
SNAP/README Normal file
View File

@@ -0,0 +1,5 @@
This is the directory where the manifest, snapinfo,
and files.tar.gz files will be created. It is also
where the usher file should be placed if it is
required by the package. Any other files that need
to be included could also be placed here.

58
SNAP/rpcbind.init Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: rpcbind $portmap
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Should-Start:
# Should-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: RPC Daemon
### END INIT INFO
. /lib/lsb/init-functions
[ -r /etc/default/rpcbind ] && . /etc/default/rpcbind
DAEMON=/sbin/rpcbind
PIDFILE=/var/run/rpcbind.pid
case "$1" in
start)
log_init_msg "Starting RPC server"
start_daemon -p "$PIDFILE" "$DAEMON" "$RPC_OPTS" \
&& log_success_msg || log_failure_msg
;;
stop)
pid=$(pidofproc -p "$PIDFILE" "$DAEMON")
if [ "$?" -ne 0 ]; then
log_init_msg "RPC server not running" && log_success_msg
exit 0
fi
log_init_msg "Stopping RPC server"
killproc -p "$PIDFILE" "$DAEMON" -TERM && log_success_msg \
|| log_failure_msg
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
pid=$(pidofproc -p "$PIDFILE" "$DAEMON")
if [ "$?" -ne 0 ]; then
echo "RPC server not running"
else
echo "RPC server running with PID: $pid"
fi
;;
*)
echo "Usage: $0 [start|stop|restart|status]"
exit 1
;;
esac
exit 0