-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add systemd scripts for cluster mode
- Loading branch information
Showing
9 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
systemctl daemon-reload |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
if [ "$1" == "remove" ] | ||
then | ||
systemctl daemon-reload | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
if [ "$1" == "remove" ] | ||
then | ||
systemctl stop wifibroadcast | ||
systemctl stop wfb-cluster | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=WFB-ng cluster manager, profile %i | ||
Requires=wfb-cluster.service | ||
ReloadPropagatedFrom=wfb-cluster.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/bin/bash -c "exec /usr/bin/wfb-server --profiles $(echo %i | tr : ' ') --cluster manual" | ||
TimeoutStopSec=5s | ||
KillMode=mixed | ||
Restart=on-failure | ||
RestartSec=5s | ||
# Set logging to file in wifibroadcast.cfg | ||
StandardError=inherit | ||
|
||
[Install] | ||
WantedBy=wfb-cluster.service |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=WFB-ng cluster node | ||
Requires=wfb-cluster.service | ||
ReloadPropagatedFrom=wfb-cluster.service | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/sbin/wfb-ng.sh | ||
TimeoutStopSec=5s | ||
Restart=on-failure | ||
KillMode=mixed | ||
RestartSec=5s | ||
StandardError=inherit | ||
|
||
[Install] | ||
WantedBy=wfb-cluster.service |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This is a mostly empty service, but allows commands like stop, start, reload | ||
# to propagate to all wfb-cluster services instances. | ||
|
||
[Unit] | ||
Description=WFB-ng cluster | ||
After=network.target | ||
Conflicts=wifibroadcast.service | ||
|
||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStart=/bin/true | ||
ExecReload=/bin/true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,10 @@ def _long_description(): | |
package_data={'wfb_ng.conf': ['master.cfg', 'site.cfg']}, | ||
data_files = [('/usr/bin', ['wfb_tx', 'wfb_rx', 'wfb_keygen', 'wfb_tx_cmd', 'scripts/wfb-cli-x11']), | ||
('/lib/systemd/system', ['scripts/wifibroadcast.service', | ||
'scripts/[email protected]']), | ||
'scripts/[email protected]', | ||
'scripts/wfb-cluster.service', | ||
'scripts/wfb-cluster-node.service', | ||
'scripts/[email protected]']), | ||
('/etc/default', ['scripts/default/wifibroadcast']), | ||
('/etc/sysctl.d', ['scripts/98-wifibroadcast.conf']), | ||
('/etc/logrotate.d', ['scripts/wifibroadcast'])] if install_data_files else [], | ||
|