Last active
September 30, 2021 09:18
-
-
Save nickfox-taterli/eefbf68d1f3df5779ad4dd7904744b54 to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
userdel -r admin | |
apt install smokeping | |
cat >/etc/systemd/system/smokeping.service <<EOF | |
[Unit] | |
Description=Smokeping Service, Network Latency Graphical Viewer | |
After=network.service | |
[Service] | |
Type=forking | |
Environment=MASTER=134.195.209.138 | |
Environment=CACHEDIR=/usr/local/smokeping/cache/ | |
Environment=SECRET=/etc/smokeping/secrets | |
Environment=SLAVENAME=[修改我] | |
ExecStart=/bin/sh -c "/usr/sbin/smokeping --master-url=http://${MASTER}/smokeping/ --cache-dir=${CACHEDIR} --slave-name=${SLAVENAME} --shared-secret=${SECRET} --logfile=/usr/local/smokeping/slave.log --debug-daemon" | |
KillSignal=SIGTERM | |
ExecReload=/bin/sh -c "/usr/sbin/smokeping --master-url=http://${MASTER}/smokeping/ --cache-dir=${CACHEDIR} --slave-name=${SLAVENAME} --shared-secret=${SECRET} --logfile=/usr/local/smokeping/slave.log --debug-daemon --reload" | |
User=smokeping | |
Group=smokeping | |
[Install] | |
WantedBy=default.target | |
EOF | |
echo 'xxoo' > /etc/smokeping/secrets | |
chmod 600 /etc/smokeping/secrets | |
chown smokeping:smokeping /etc/smokeping/secrets | |
mkdir /usr/local/smokeping/cache -p | |
chown smokeping:smokeping /usr/local/smokeping -R | |
chown smokeping:smokeping /var/cache/smokeping -R | |
chown smokeping:www-data /var/lib/smokeping -R | |
chmod 755 /var/lib/smokeping -R | |
systemctl enable smokeping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment