uptimed package
Hi,
I usually install uptimed on my machine, so i can keep tracks of the uptime, reboots and kernel
Unfortunately, the package uptimed does not exist on artix, only in arch/extra
Do you think it could be added to artix repos ?
Also, for this to work, it needs a daemon to be started, which records the boot time and kernel
So i wrote the service file, for runit and openrc. tested and working
1/ runit
file: /etc/runit/sv/uptimed/run
#!/bin/sh
install -d -m775 -o daemon -g daemon /run/uptimed
install -d -m775 -o daemon -g daemon /var/spool/uptimed
exec chpst -u daemon -U daemon /usr/bin/uptimed -f
2/ openrc
file: /etc/init.d/uptimed
#!/usr/bin/openrc-run
UPTIMED_OPTS="-p /run/uptimed/uptimed.pid"
depend()
{
need localmount
}
start_pre()
{
install -d -m 755 -o daemon -g daemon /run/uptimed
install -d -m 755 -o daemon -g daemon /var/spool/uptimed
uptimed -b
}
start()
{
ebegin "Starting uptimed"
start-stop-daemon --start --quiet -u daemon:daemon --exec /usr/bin/uptimed -- ${UPTIMED_OPTS}
eend $?
}
stop()
{
ebegin "Stopping uptimed"
start-stop-daemon --stop --quiet --exec /usr/bin/uptimed
eend $?
}
enjoy