mirror of
https://github.com/bjango/istatserverlinux.git
synced 2025-10-21 15:08:08 +00:00
Added boot script examples
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
._*
|
||||
istatserver
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
dist_man_MANS = istatserver.1 istatserver.conf.5
|
||||
EXTRA_DIST = istatserver.conf istatserver_generated.conf
|
||||
EXTRA_DIST = istatserver.conf istatserver_generated.conf systemd upstart rc.d
|
||||
|
||||
#dist_sysconf_DATA = istatserver.conf
|
||||
|
||||
|
16
resource/rc.d/istatserver
Executable file
16
resource/rc.d/istatserver
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
# PROVIDE: istatserver
|
||||
# REQUIRE: FILESYSTEMS NETWORKING netif
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="istatserver"
|
||||
command="/usr/local/bin/istatserver"
|
||||
rcvar="istatserver_enable"
|
||||
command_args="-d"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
17
resource/systemd/istatserver.service
Normal file
17
resource/systemd/istatserver.service
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# istatserver daemon service unit file
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=System monitoring daemon for remote monitoring with iStat for iOS or iStat for macOS
|
||||
Documentation=man:istatserver(1)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/istatserver -d
|
||||
Restart=on-abort
|
||||
RestartSec=5
|
||||
Type=forking
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
16
resource/upstart/istatserver.conf
Normal file
16
resource/upstart/istatserver.conf
Normal file
@@ -0,0 +1,16 @@
|
||||
# istatserver
|
||||
|
||||
description "istatserver daemon"
|
||||
author "Bjango"
|
||||
|
||||
start on (local-filesystems and net-device-up IFACE!=lo)
|
||||
stop on shutdown
|
||||
|
||||
expect daemon
|
||||
expect fork
|
||||
respawn
|
||||
respawn limit 99 5
|
||||
|
||||
script
|
||||
exec /usr/local/bin/istatserver -d
|
||||
end script
|
@@ -106,7 +106,7 @@ int main(int argc, char ** argv)
|
||||
cout << endl;
|
||||
cout << " --pid=FILE custom pid file location" << endl;
|
||||
cout << " --socket=FILE custom socket file location" << endl;
|
||||
cout << " --code=CODE custom lock code" << endl;
|
||||
cout << " --code=CODE custom passcode" << endl;
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user