case "$1" in
start)
- echo -n "Starting acpid: "
+ printf "Starting acpid: "
start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping acpid: "
+ printf "Stopping acpid: "
start-stop-daemon -K -q -p /var/run/acpid.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
umask 077
start() {
- echo -n "Starting atd: "
+ printf "Starting atd: "
start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
echo "OK"
}
stop() {
- echo -n "Stopping atd: "
+ printf "Stopping atd: "
start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
echo "OK"
}
PIDFILE=/var/run/${NAME}.pid
start(){
- echo -n "Starting ${NAME}: "
+ printf "Starting ${NAME}: "
# Create dir to store log files in if one doesn't exist. Create
# the directory with SELinux permissions if possible
}
stop(){
- echo -n "Stopping ${NAME}: "
+ printf "Stopping ${NAME}: "
start-stop-daemon -K -q -p ${PIDFILE}
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
reload(){
- echo -n "Reloading ${NAME} configuration: "
+ printf "Reloading ${NAME} configuration: "
start-stop-daemon --stop -s 1 -p ${PIDFILE} 1>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
rotate(){
- echo -n "Rotating ${NAME} logs: "
+ printf "Rotating ${NAME} logs: "
start-stop-daemon --stop -s 10 -p ${PIDFILE} 1>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
if [ ! -f /etc/rndc.key ]; then
- echo -n "Initializing bind control key: "
+ printf "Initializing bind control key: "
# if rndc.key is a symlink, the target must exist
touch /etc/rndc.key
rndc-confgen -a -r /dev/urandom 2>/dev/null && echo "OK" || echo "FAIL"
fi
- echo -n "Starting domain name daemon: "
+ printf "Starting domain name daemon: "
start-stop-daemon -S -x $DAEMON -- -c $CONFIG -u named
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping domain name daemon: "
+ printf "Stopping domain name daemon: "
rndc stop || start-stop-daemon -K -x $DAEMON
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
#
start() {
- echo -n "Starting logging: "
+ printf "Starting logging: "
start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
echo "OK"
}
stop() {
- echo -n "Stopping logging: "
+ printf "Stopping logging: "
start-stop-daemon -K -q -p /var/run/syslogd.pid
start-stop-daemon -K -q -p /var/run/klogd.pid
echo "OK"
#
start() {
- echo -n "Starting telnetd: "
+ printf "Starting telnetd: "
start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
-x /usr/sbin/telnetd -- -F
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping telnetd: "
+ printf "Stopping telnetd: "
start-stop-daemon -K -q -p /var/run/telnetd.pid \
-x /usr/sbin/telnetd
[ $? = 0 ] && echo "OK" || echo "FAIL"
case "$1" in
start)
- echo -n "Starting c-icap server: "
+ printf "Starting c-icap server: "
start-stop-daemon -S -q -b -m -p /var/run/c-icap.pid \
-x /usr/bin/c-icap -- -N
[ $? == 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping c-icap server: "
+ printf "Stopping c-icap server: "
start-stop-daemon -K -q -p /var/run/c-icap.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
case "$1" in
start)
- echo -n "Starting chrony: "
+ printf "Starting chrony: "
chronyd && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping chrony: "
+ printf "Stopping chrony: "
killall chronyd && echo "OK" || echo "FAIL"
;;
restart|reload)
case "$1" in
start)
- echo -n "Starting connman ... "
+ printf "Starting connman ... "
start-stop-daemon -S -q -m -b -p /var/run/connmand.pid --exec /usr/sbin/connmand -- -n
echo "done."
;;
stop)
- echo -n "Stopping connman ..."
+ printf "Stopping connman ..."
start-stop-daemon -K -q -p /var/run/connmand.pid
echo "done."
;;
RETVAL=0
start() {
- echo -n "Starting system message bus: "
+ printf "Starting system message bus: "
dbus-uuidgen --ensure
dbus-daemon --system
}
stop() {
- echo -n "Stopping system message bus: "
+ printf "Stopping system message bus: "
## we don't want to kill all the per-user $processname, we want
## to use the pid file *only*; because we use the fake nonexistent
case "$1" in
start)
- echo -n "Starting cron ... "
+ printf "Starting cron ... "
start-stop-daemon -S -q -m -b -p /var/run/dcron.pid --exec /usr/sbin/crond -- -f
echo "done."
;;
stop)
- echo -n "Stopping cron ..."
+ printf "Stopping cron ..."
start-stop-daemon -K -q -p /var/run/dcron.pid
echo "done."
;;
case "$1" in
start)
- echo -n "Starting DHCP relay: "
+ printf "Starting DHCP relay: "
start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping DHCP relay: "
+ printf "Stopping DHCP relay: "
start-stop-daemon -K -x /usr/sbin/dhcrelay
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
case "$1" in
start)
- echo -n "Starting DHCP server: "
+ printf "Starting DHCP server: "
test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping DHCP server: dhcpd3"
+ printf "Stopping DHCP server: dhcpd3"
start-stop-daemon -K -x /usr/sbin/dhcpd
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
case "$1" in
start)
- echo -n "Starting dnsmasq: "
+ printf "Starting dnsmasq: "
start-stop-daemon -S -x /usr/sbin/dnsmasq
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping dnsmasq: "
+ printf "Stopping dnsmasq: "
start-stop-daemon -K -q -x /usr/sbin/dnsmasq
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
fi
fi
- echo -n "Starting dropbear sshd: "
+ printf "Starting dropbear sshd: "
umask 077
start-stop-daemon -S -q -p /var/run/dropbear.pid \
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping dropbear sshd: "
+ printf "Stopping dropbear sshd: "
start-stop-daemon -K -q -p /var/run/dropbear.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
mkrundir || exit 1
- echo -n "Starting ejabberd... "
+ printf "Starting ejabberd... "
"$CTL" start
# Wait until ejabberd is up and running.
if "$CTL" started; then
fi
;;
stop)
- echo -n "Stopping ejabberd... "
+ printf "Stopping ejabberd... "
"$CTL" stop > /dev/null
if [ $? -eq 3 ] || "$CTL" stopped; then
echo "OK"
start-stop-daemon -S -x exim -- -bd
;;
stop)
- echo -n "Stopping exim..."
+ printf "Stopping exim..."
start-stop-daemon -K -o -p $PIDFILE
;;
restart|reload)
PIDFILE=/var/run/$NAME.pid
start() {
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -P $PIDFILE $DEVICES && echo "OK" || echo "Failed"
}
stop() {
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed"
rm -f $PIDFILE
}
case "$1" in
start)
- echo -n "Starting haveged: "
+ printf "Starting haveged: "
start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping haveged: "
+ printf "Stopping haveged: "
start-stop-daemon -K -x /usr/sbin/haveged
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
fi
if [ "$VERBOSE" != no ]
then
- echo -n "Initializing random number generator... "
+ printf "Initializing random number generator... "
fi
# Load and then save 512 bytes,
# which is the size of the entropy pool
fi
# Carry a random seed from shut-down to start-up;
# see documentation in linux/drivers/char/random.c
- [ "$VERBOSE" != no ] && echo -n "Saving random seed... "
+ [ "$VERBOSE" != no ] && printf "Saving random seed... "
umask 077
dd if=/dev/urandom of=/etc/random-seed count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
/sbin/ifup -a
;;
stop)
- echo -n "Stopping network..."
+ printf "Stopping network..."
/sbin/ifdown -a
;;
restart|reload)
[ -f /usr/bin/input-event-daemon ] || exit 0
start() {
- echo -n "Starting input-event-daemon: "
+ printf "Starting input-event-daemon: "
input-event-daemon
echo "done"
}
stop() {
- echo -n "Stopping input-event-daemon: "
+ printf "Stopping input-event-daemon: "
killall input-event-daemon
echo "done"
}
case "$1" in
start)
- echo -n "Starting irqbalance: "
+ printf "Starting irqbalance: "
start-stop-daemon -S -q -x $EXEC -- $ARGS
if [ $? != 0 ]; then
echo "FAILED"
pidof irqbalance > $PID
;;
stop)
- echo -n "Stopping irqbalance: "
+ printf "Stopping irqbalance: "
start-stop-daemon -K -q -p $PID
echo "OK"
;;
PIDFILE=/var/run/kodi.pid
start() {
- echo -n "Starting Kodi: "
+ printf "Starting Kodi: "
start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping Kodi: "
+ printf "Stopping Kodi: "
start-stop-daemon -K -q -p $PIDFILE
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
#
start() {
- echo -n "Starting lighttpd: "
+ printf "Starting lighttpd: "
start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf
echo "OK"
}
stop() {
- echo -n "Stopping lighttpd: "
+ printf "Stopping lighttpd: "
start-stop-daemon -K -q -p /var/run/lighttpd.pid
echo "OK"
}
#
start() {
- echo -n "Starting lirc: "
+ printf "Starting lirc: "
mkdir -p /var/run/lirc
ln -sf /var/run/lirc/lircd /dev/lircd
start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -n -O /etc/lirc/lirc_options.conf
}
stop() {
- echo -n "Stopping lirc: "
+ printf "Stopping lirc: "
start-stop-daemon -K -q -p /var/run/lirc.pid
echo "OK"
}
#
start() {
- echo -n "Starting minidlna: "
+ printf "Starting minidlna: "
umask 077
start-stop-daemon -S -q -p /var/run/minidlna/minidlna.pid \
--exec /usr/sbin/minidlnad
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping minidlna: "
+ printf "Stopping minidlna: "
start-stop-daemon -K -q -p /var/run/minidlna/minidlna.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
[ -x $MODEMMANAGER_BIN ] || exit 0
start() {
- echo -n "Starting ModemManager: "
+ printf "Starting ModemManager: "
umask 077
start-stop-daemon -S -q -b -m -p $PIDFILE \
--exec /usr/sbin/ModemManager
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping ModemManager: "
+ printf "Stopping ModemManager: "
start-stop-daemon -K -q -p $PIDFILE
[ $? = 0 ] && { echo "OK"; rm -f $PIDFILE; } || echo "FAIL"
}
echo "$NAME."
;;
stop)
- echo -n "Stopping $DESC: "
+ printf "Stopping $DESC: "
start-stop-daemon -K -x "$DAEMON"
echo "$NAME."
;;
restart|force-reload)
- echo -n "Restarting $DESC: "
+ printf "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON"
sleep 1
start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
#!/bin/sh
start() {
- echo -n "Starting mosquitto: "
+ printf "Starting mosquitto: "
start-stop-daemon -S -q -m -b -p /var/run/mosquitto.pid \
--exec /usr/sbin/mosquitto \
-- -c /etc/mosquitto/mosquitto.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping mosquitto: "
+ printf "Stopping mosquitto: "
start-stop-daemon -K -q -p /var/run/mosquitto.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
test -f /etc/mpd.conf || exit 0
start() {
- echo -n "Starting mpd: "
+ printf "Starting mpd: "
start-stop-daemon --start --quiet --background --exec /usr/bin/mpd \
&& echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping mpd: "
+ printf "Stopping mpd: "
start-stop-daemon --stop --quiet --pidfile /var/run/mpd.pid \
&& echo "OK" || echo "FAIL"
}
# We don't use start-stop-daemon because mysqld has
# its own wrapper script.
- echo -n "Starting mysql..."
+ printf "Starting mysql..."
/usr/bin/mysqld_safe --pid-file=/var/run/mysqld.pid &
echo "done."
;;
stop)
- echo -n "Stopping mysql..."
+ printf "Stopping mysql..."
if test -f /var/run/mysqld.pid ; then
kill `cat /var/run/mysqld.pid`
fi
case "$1" in
start)
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*'
echo "OK"
;;
stop)
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon -K -q -p /var/run/${NAME}.pid
echo "OK"
;;
case "$1" in
start)
# Start daemon.
- echo -n "Starting network plug daemon: "
+ printf "Starting network plug daemon: "
start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS}
RETVAL=$?
echo
;;
stop)
# Stop daemon.
- echo -n "Shutting down network plug daemon: "
+ printf "Shutting down network plug daemon: "
start-stop-daemon -K -n netplugd
RETVAL=$?
echo
case "$1" in
start)
- echo -n "Starting network management services:"
+ printf "Starting network management services:"
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
- echo -n " snmpd"
+ printf " snmpd"
fi
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
- echo -n " snmptrapd"
+ printf " snmptrapd"
fi
echo "."
;;
stop)
- echo -n "Stopping network management services:"
+ printf "Stopping network management services:"
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
- echo -n " snmpd"
+ printf " snmpd"
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
- echo -n " snmptrapd"
+ printf " snmptrapd"
echo "."
;;
restart)
- echo -n "Restarting network management services:"
+ printf "Restarting network management services:"
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
# Allow the daemons time to exit completely.
sleep 2
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
- echo -n " snmpd"
+ printf " snmpd"
fi
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
# Allow snmpd time to start up.
sleep 1
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
- echo -n " snmptrapd"
+ printf " snmptrapd"
fi
echo "."
;;
reload|force-reload)
- echo -n "Reloading network management services:"
+ printf "Reloading network management services:"
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
- echo -n " snmpd"
+ printf " snmpd"
fi
echo "."
;;
PID=`pidof NetworkManager`
case "$1" in
start)
- echo -n "Starting NetworkManager ... "
+ printf "Starting NetworkManager ... "
[ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
if [ -z "$PID" ]; then
$NETWORKMANAGER_BIN
fi
;;
stop)
- echo -n "Stopping NetworkManager ... "
+ printf "Stopping NetworkManager ... "
[ ! -z "$PID" ] && kill $PID > /dev/null 2>&1
if [ $? -gt 0 ]; then
echo "failed!"
start() {
# Start daemons.
- echo -n "Starting NFS statd: "
+ printf "Starting NFS statd: "
rpc.statd
touch /var/lock/subsys/nfslock
echo "done"
- echo -n "Starting NFS services: "
+ printf "Starting NFS services: "
/usr/sbin/exportfs -r
echo "done"
- echo -n "Starting NFS daemon: "
+ printf "Starting NFS daemon: "
rpc.nfsd 2
echo "done"
- echo -n "Starting NFS mountd: "
+ printf "Starting NFS mountd: "
rpc.mountd
echo "done"
touch /var/lock/subsys/nfs
stop() {
# Stop daemons.
- echo -n "Shutting down NFS mountd: "
+ printf "Shutting down NFS mountd: "
killall -q rpc.mountd
echo "done"
kill -9 `pidof nfsd` 2>/dev/null
echo "done"
- echo -n "Shutting down NFS services: "
+ printf "Shutting down NFS services: "
/usr/sbin/exportfs -au
rm -f /var/lock/subsys/nfs
killall -q rpc.statd
echo "done"
- echo -n "Stopping NFS statd: "
+ printf "Stopping NFS statd: "
killall -q rpc.statd
echo "done"
rm -f /var/lock/subsys/nfslock
start-stop-daemon -S -x /usr/sbin/nginx -p $PIDFILE
;;
stop)
- echo -n "Stopping nginx..."
+ printf "Stopping nginx..."
start-stop-daemon -K -o -p $PIDFILE
;;
restart|reload)
case "$1" in
start)
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
start-stop-daemon -S -q -x $DAEMON -- -g
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon -K -q -n $NAME
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
case "$1" in
start)
- echo -n "Starting ofono ... "
+ printf "Starting ofono ... "
start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n
echo "done."
;;
stop)
- echo -n "Stopping ofono ..."
+ printf "Stopping ofono ..."
start-stop-daemon -K -q -p /var/run/ofonod.pid
echo "done."
;;
case "$1" in
start)
- echo -n "Starting oslrd daemon: "
+ printf "Starting oslrd daemon: "
start-stop-daemon -S -q -x /usr/sbin/olsrd -- -d 0 -pidfile /run/olsrd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping olsrd daemon: "
+ printf "Stopping olsrd daemon: "
start-stop-daemon -K -q -p /run/olsrd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
case "$1" in
start)
- echo -n "Starting openntpd: "
+ printf "Starting openntpd: "
start-stop-daemon -S -x /usr/sbin/ntpd -- -p /run/ntpd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping openntpd: "
+ printf "Stopping openntpd: "
start-stop-daemon -K -q -p /run/ntpd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
umask 077
start() {
- echo -n "Starting sshd: "
+ printf "Starting sshd: "
/usr/sbin/sshd
touch /var/lock/sshd
echo "OK"
}
stop() {
- echo -n "Stopping sshd: "
+ printf "Stopping sshd: "
killall sshd
rm -f /var/lock/sshd
echo "OK"
case "$1" in
start)
- echo -n "Starting vmtoolsd: "
+ printf "Starting vmtoolsd: "
start-stop-daemon -S -q -x $EXEC -- $ARGS $PID
if [ $? != 0 ]; then
echo "FAILED"
fi
;;
stop)
- echo -n "Stopping vmtoolsd: "
+ printf "Stopping vmtoolsd: "
start-stop-daemon -K -q -p $PID
echo "OK"
;;
start_vpn () {
$DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \
- --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->"
- echo -n " $NAME"
+ --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->"
+ printf " $NAME"
}
stop_vpn () {
kill `cat $PIDFILE` || true
case "$1" in
start)
- echo -n "Starting openvpn:"
+ printf "Starting openvpn:"
if test -z $2 ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
NAME=$2
start_vpn
else
- echo -n " No such VPN: $2"
+ printf " No such VPN: $2"
fi
fi
echo "."
;;
stop)
- echo -n "Stopping openvpn:"
+ printf "Stopping openvpn:"
if test -z $2 ; then
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- echo -n " $NAME"
+ printf " $NAME"
done
else
if test -e /var/run/openvpn.$2.pid ; then
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- echo -n " $NAME"
+ printf " $NAME"
else
- echo -n " No such VPN: $2"
+ printf " No such VPN: $2"
fi
fi
echo "."
;;
# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
reload|force-reload)
- echo -n "Reloading openvpn:"
+ printf "Reloading openvpn:"
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
sleep 1
start_vpn
- echo -n "(restarted)"
+ printf "(restarted)"
else
kill -HUP `cat $PIDFILE` || true
# start-stop-daemon --stop --signal HUP --quiet --oknodo \
# --exec $DAEMON --pidfile $PIDFILE
- echo -n " $NAME"
+ printf " $NAME"
fi
done
echo "."
[ -f /sbin/portmap ] || exit 0
start() {
- echo -n "Starting portmap: "
+ printf "Starting portmap: "
portmap
mkdir -p /var/lock/subsys
touch /var/lock/subsys/portmap
stop() {
- echo -n "Stopping portmap: "
+ printf "Stopping portmap: "
echo
killall portmap
rm -rf /var/lock/subsys
fi
start() {
- echo -n "Starting postgresql: "
+ printf "Starting postgresql: "
su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
echo "OK"
}
stop() {
- echo -n "Stopping postgresql: "
+ printf "Stopping postgresql: "
su - postgres -c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast'
echo "OK"
}
[ ! -f /var/log/wtmp ] && touch /var/log/wtmp
start() {
- echo -n "Starting ProFTPD: "
+ printf "Starting ProFTPD: "
$DAEMON
if [ $? != 0 ]; then
echo "FAILED"
}
stop() {
- echo -n "Stopping ProFTPD: "
+ printf "Stopping ProFTPD: "
killall proftpd
echo "done"
}
case "$1" in
start)
- echo -n "Starting ptpd: "
+ printf "Starting ptpd: "
start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S
if [ $? != 0 ]; then
echo "FAILED"
fi
;;
stop)
- echo -n "Stopping ptpd: "
+ printf "Stopping ptpd: "
start-stop-daemon -K -q -x /usr/sbin/ptpd
echo "OK"
;;
case "$1" in
start)
- echo -n "Starting ptpd2: "
+ printf "Starting ptpd2: "
start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g
if [ $? != 0 ]; then
echo "FAILED"
fi
;;
stop)
- echo -n "Stopping ptpd2: "
+ printf "Stopping ptpd2: "
start-stop-daemon -K -q -x /usr/sbin/ptpd2
echo "OK"
;;
start() {
- echo -n "Starting pulseaudio: "
+ printf "Starting pulseaudio: "
umask 077
/usr/bin/pulseaudio --system --daemonize
echo "OK"
}
stop() {
- echo -n "Stopping pulseaudio: "
+ printf "Stopping pulseaudio: "
pulseaudio --kill
echo "OK"
}
case "$1" in
start)
- echo -n "Starting web2py: "
+ printf "Starting web2py: "
start-stop-daemon -S -q -m -p /run/web2py.pid \
-c www-data \
-b -x /var/www/web2py/web2py.py \
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping web2py: "
+ printf "Stopping web2py: "
start-stop-daemon -K -q -p /run/web2py.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
-echo -n "Starting radvd: "
+printf "Starting radvd: "
if [ ! -x "${RADVD}" ]; then
echo "missing"
exit 1
#
start() {
- echo -n "Starting redis: "
+ printf "Starting redis: "
umask 077
start-stop-daemon -S -q -c redis:redis -b \
--exec /usr/bin/redis-server -- /etc/redis.conf
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping redis: "
+ printf "Stopping redis: "
/usr/bin/redis-cli shutdown
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
#
start() {
- echo -n "Starting rpcbind: "
+ printf "Starting rpcbind: "
umask 077
start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/bin/rpcbind
echo "OK"
}
stop() {
- echo -n "Stopping rpcbind daemon: "
+ printf "Stopping rpcbind daemon: "
start-stop-daemon -K -q -p /var/run/rpcbind.pid
echo "OK"
}
start()
{
- echo -n "Starting $DESC: "
+ printf "Starting $DESC: "
start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS &&
echo "done" || echo "failed"
}
stop()
{
- echo -n "Stopping $DESC: "
+ printf "Stopping $DESC: "
if start-stop-daemon -K -q -R TERM/30/KILL/5 -p "$PIDFILE" -n "$NAME"; then
# This daemon does not remove its PID file when it exits.
rm -f "$PIDFILE"
#!/bin/sh
start() {
- echo -n "Starting rsyslog daemon: "
+ printf "Starting rsyslog daemon: "
start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping rsyslog daemon: "
+ printf "Stopping rsyslog daemon: "
start-stop-daemon -K -q -p /var/run/rsyslogd.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
RETVAL=0
start() {
- echo -n "Starting SMB services: "
+ printf "Starting SMB services: "
smbd -D
RETVAL=$?
echo "done"
- echo -n "Starting NMB services: "
+ printf "Starting NMB services: "
nmbd -D
RETVAL2=$?
echo "done"
}
stop() {
- echo -n "Shutting down SMB services: "
+ printf "Shutting down SMB services: "
kill -9 `pidof smbd`
RETVAL=$?
rm -f /var/run/samba/smbd.pid
echo "done"
- echo -n "Shutting down NMB services: "
+ printf "Shutting down NMB services: "
kill -9 `pidof nmbd`
RETVAL2=$?
rm -f /var/run/samba/nmbd.pid
}
reload() {
- echo -n "Reloading smb.conf file: "
+ printf "Reloading smb.conf file: "
kill -HUP `pidof smbd`
RETVAL=$?
echo "done"
mkdir -p /var/log/samba
start() {
- echo -n "Starting SMB services: "
+ printf "Starting SMB services: "
smbd -D
[ $? = 0 ] && echo "OK" || echo "FAIL"
- echo -n "Starting NMB services: "
+ printf "Starting NMB services: "
nmbd -D
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Shutting down SMB services: "
+ printf "Shutting down SMB services: "
kill -9 `pidof smbd`
[ $? = 0 ] && echo "OK" || echo "FAIL"
- echo -n "Shutting down NMB services: "
+ printf "Shutting down NMB services: "
kill -9 `pidof nmbd`
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
}
reload() {
- echo -n "Reloading smb.conf file: "
+ printf "Reloading smb.conf file: "
kill -HUP `pidof smbd`
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
- echo -n "Starting shairport-sync: "
+ printf "Starting shairport-sync: "
start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
- echo -n "Stopping shairport-sync: "
+ printf "Stopping shairport-sync: "
start-stop-daemon -K -q -p /var/run/shairport-sync.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
start()
{
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
mkdir -p $SPOOL/outgoing
mkdir -p $SPOOL/incoming
mkdir -p $SPOOL/checked
stop()
{
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed"
rm -f $PIDFILE
}
case "$1" in
start)
- echo -n "Starting squid: "
+ printf "Starting squid: "
if [ ! -d /var/log/squid ]; then
mkdir -p /var/log/squid
chown squid:squid /var/log/squid
;;
stop)
- echo -n "Stopping squid: "
+ printf "Stopping squid: "
/usr/sbin/squid -k shutdown
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
reload)
- echo -n "Reloading squid configuration: "
+ printf "Reloading squid configuration: "
/usr/sbin/squid -k reconfigure
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
- echo -n "Restarting squid: "
+ printf "Restarting squid: "
/usr/sbin/squid -k restart
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
#!/bin/sh
start() {
- echo -n "Starting stunnel: "
+ printf "Starting stunnel: "
start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping stunnel: "
+ printf "Stopping stunnel: "
start-stop-daemon -K -q -p /var/run/stunnel.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
- echo -n "Starting supervisord: "
+ printf "Starting supervisord: "
start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord
echo "done"
;;
stop)
- echo -n "Stopping supervisord: "
+ printf "Stopping supervisord: "
start-stop-daemon -K -q -p /var/run/supervisord.pid
echo "done"
;;
case "$1" in
start)
- echo -n "Starting logging: "
+ printf "Starting logging: "
/sbin/syslogd -m 0
/sbin/klogd
echo "OK"
;;
stop)
- echo -n "Stopping logging: "
+ printf "Stopping logging: "
[ -f /var/run/klogd.pid ] && kill `cat /var/run/klogd.pid`
[ -f /var/run/syslogd.pid ] && kill `cat /var/run/syslogd.pid`
echo "OK"
start() {
local ret
- echo -n "Restoring target configuration: "
+ printf "Restoring target configuration: "
/usr/bin/targetctl restore >/dev/null 2>&1
ret=$?
echo "done"
stop() {
local ret
- echo -n "Clearing target configuration: "
+ printf "Clearing target configuration: "
/usr/bin/targetctl clear >/dev/null 2>&1
ret=$?
echo "done"
case "$1" in
start)
- echo -n "Starting $DESC: "
+ printf "Starting $DESC: "
d_start
echo "done"
;;
stop)
- echo -n "Stopping $DESC: "
+ printf "Stopping $DESC: "
d_stop
echo "done"
;;
# If the daemon responds to changes in its config file
# directly anyway, make this an "exit 0".
#
- # echo -n "Reloading $DESC configuration..."
+ # printf "Reloading $DESC configuration..."
# d_reload
# echo "done."
#;;
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
- echo -n "Restarting $DESC: "
+ printf "Restarting $DESC: "
d_stop
sleep 1
d_start
case "$1" in
start)
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
$NAME > /dev/null &
echo "done"
;;
stop)
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
killall -9 $NAME
echo "done"
;;
restart)
- echo -n "Restarting $NAME: "
+ printf "Restarting $NAME: "
killall -9 $NAME
sleep 1
$NAME > /dev/null &
[ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy
start() {
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
&& echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
&& echo "OK" || echo "FAIL"
}
test -f $DAEMON || exit 0
start() {
- echo -n "Starting $NAME: "
+ printf "Starting $NAME: "
start-stop-daemon --start --quiet --background --exec $DAEMON \
-- $DAEMON_ARGS \
&& echo "OK" || echo "FAIL"
}
stop() {
- echo -n "Stopping $NAME: "
+ printf "Stopping $NAME: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
&& echo "OK" || echo "FAIL"
}
case "$1" in
start)
- echo -n "Starting $DESC: "
+ printf "Starting $DESC: "
start-stop-daemon -S -b -x $NAME
echo "OK"
;;
stop)
- echo -n "Stopping $DESC: "
+ printf "Stopping $DESC: "
start-stop-daemon -K -x $NAME
echo "OK"
;;
case "$1" in
start)
- echo -n "Starting XDM: "
+ printf "Starting XDM: "
$XDM_BIN
echo "done"
;;
done; \
done; \
\
- echo -n
+ printf
#
# Copy the full external toolchain sysroot directory to the staging
fi ; \
mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \
relpath="./" ; \
- nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
+ nbslashs=`printf $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
for slash in `seq 1 $${nbslashs}` ; do \
relpath=$${relpath}"../" ; \
done ; \
#
# And variations on these.
define toolchain_find_sysroot
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
endef
# Returns the lib subdirectory for the given compiler + flags (i.e
# typically lib32 or lib64 for some toolchains)
define toolchain_find_libdir
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
endef
# Checks for an already installed toolchain: check the toolchain