|
@@ -78,34 +78,31 @@ echo -e "\e[97mDone.\e[0m"
|
|
|
function foxypool_service_ {
|
|
|
echo -e "$(tput setaf 10)\nInstall FoxyPool service :$(tput sgr0)"
|
|
|
cat > $HOME/foxypool.service << EOF
|
|
|
-# The foxypool service (part of systemd)
|
|
|
-# file: /etc/systemd/system/foxypool.service
|
|
|
-
|
|
|
[Unit]
|
|
|
-Description = Foxypool Service
|
|
|
+Description=Foxy-GH-Farmer Service
|
|
|
After=network.target
|
|
|
+Wants=network-online.target
|
|
|
|
|
|
[Service]
|
|
|
Type=simple
|
|
|
-User = $USER
|
|
|
-WorkingDirectory= $HOME/miners/foxy-gh-farmer
|
|
|
-ExecStart = $HOME/miners/foxy-gh-farmer/foxy-gh-farmer -c $HOME/miners/foxy-gh-farmer/foxy-gh-farmer.yaml
|
|
|
-Restart = on-failure
|
|
|
+User=$USER
|
|
|
+WorkingDirectory=$HOME/miners/foxypool
|
|
|
+ExecStart=$HOME/miners/foxypool/foxy-gh-farmer -c $HOME/miners/foxypool/foxy-gh-farmer.yaml
|
|
|
+Restart=on-failure
|
|
|
RestartSec=30
|
|
|
LimitNOFILE=99999
|
|
|
StandardOutput=syslog
|
|
|
StandardError=syslog
|
|
|
-SyslogIdentifier=foxypool
|
|
|
-
|
|
|
+SyslogIdentifier=foxy-gh-farmer
|
|
|
|
|
|
[Install]
|
|
|
-WantedBy = multi-user.target
|
|
|
+WantedBy=multi-user.target
|
|
|
EOF
|
|
|
sudo mv $HOME/foxypool.service /etc/systemd/system/foxypool.service >/dev/null
|
|
|
sudo chmod 644 /etc/systemd/system/foxypool.service
|
|
|
|
|
|
cat <<'EOF'>> foxypool.conf
|
|
|
-if $programname == 'flexfarmer' then /var/log/foxypool.log
|
|
|
+if $programname == 'foxy-gh-farmer' then /var/log/foxypool.log
|
|
|
& stop
|
|
|
EOF
|
|
|
sudo cp foxypool.conf /etc/rsyslog.d/foxypool.conf
|