Scanopy: remove integrated daemon script (#11100)
This commit is contained in:
@@ -100,39 +100,39 @@ EOF
|
||||
systemctl enable -q --now scanopy-server
|
||||
|
||||
# Creating short script to configure scanopy-daemon
|
||||
cat <<EOF >~/configure_daemon.sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Auto-configuring integrated daemon..."
|
||||
|
||||
NETWORK_ID="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT id FROM networks;')"
|
||||
API_KEY="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT key FROM api_keys;')"
|
||||
|
||||
cat <<END >/etc/systemd/system/scanopy-daemon.service
|
||||
[Unit]
|
||||
Description=Scanopy Network Discovery Daemon
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/usr/bin/scanopy-daemon --server-url http://127.0.0.1:60072 --network-id \${NETWORK_ID} --daemon-api-key \${API_KEY} --mode push
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
END
|
||||
|
||||
systemctl enable -q --now scanopy-daemon
|
||||
echo "Scanopy daemon configured and running"
|
||||
|
||||
EOF
|
||||
chmod +x ~/configure_daemon.sh
|
||||
msg_ok "Scanopy server running - please create an account in the UI to continue."
|
||||
# cat <<EOF >~/configure_daemon.sh
|
||||
# #!/usr/bin/env bash
|
||||
#
|
||||
# echo "Auto-configuring integrated daemon..."
|
||||
#
|
||||
# NETWORK_ID="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT id FROM networks;')"
|
||||
# API_KEY="\$(sudo -u postgres psql -1 -t -d "${PG_DB_NAME}" -c 'SELECT key FROM api_keys;')"
|
||||
#
|
||||
# cat <<END >/etc/systemd/system/scanopy-daemon.service
|
||||
# [Unit]
|
||||
# Description=Scanopy Network Discovery Daemon
|
||||
# After=network-online.target
|
||||
# Wants=network-online.target
|
||||
#
|
||||
# [Service]
|
||||
# Type=simple
|
||||
# User=root
|
||||
# ExecStart=/usr/bin/scanopy-daemon --server-url http://127.0.0.1:60072 --network-id \${NETWORK_ID} --daemon-api-key \${API_KEY} --mode push
|
||||
# Restart=always
|
||||
# RestartSec=10
|
||||
# StandardOutput=journal
|
||||
# StandardError=journal
|
||||
#
|
||||
# [Install]
|
||||
# WantedBy=multi-user.target
|
||||
# END
|
||||
#
|
||||
# systemctl enable -q --now scanopy-daemon
|
||||
# echo "Scanopy daemon configured and running"
|
||||
#
|
||||
# EOF
|
||||
# chmod +x ~/configure_daemon.sh
|
||||
msg_ok "Scanopy server running - please create an account, daemon API key and daemon in the Scanopy UI."
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
Reference in New Issue
Block a user