HEX
Server: Apache/2.4.67 (Debian)
System: Linux hosting103 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User: muzikaecom (1013)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //etc/rc1.d/K01uptimed
#! /bin/sh
### BEGIN INIT INFO
# Provides:          uptimed
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Should-Start:      uptimed-init
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Uptime daemon
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/uptimed
NAME=uptimed
DESC="uptime daemon"
USER="daemon"
PIDDIR=/run/uptimed
PIDFILE=$PIDDIR/uptimed.pid

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

# Source defaults file; edit that file to configure this script.
if [ -e /etc/default/uptimed ]; then
  . /etc/default/uptimed
fi


case "$1" in
  start)
	if [ ! -d $PIDDIR ]; then
		mkdir $PIDDIR
		chown $USER:$USER $PIDDIR
	fi
	echo -n "Starting $DESC: "
	start-stop-daemon --start --quiet --user daemon --chuid daemon --pidfile $PIDFILE --exec $DAEMON
	echo "$NAME."
	;;
  stop)
	echo -n "Stopping $DESC: "
	start-stop-daemon --stop --quiet --user daemon  --pidfile $PIDFILE --exec $DAEMON
	echo "$NAME."
	;;
  restart|force-reload)
	$0 stop
	sleep 2
	$0 start
	;;
  status)
	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
	exit 1
	;;
esac

exit 0