mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2026-10-26 06:40:05 -05:00
Fix: Build script doesn't care if services aren't running.
This commit is contained in:
1 parent
1bfac91b2e
commit
415eef2740
1 file changed
+8
-5
+8
-5
@@ -116,18 +116,21 @@ sudo chown -R $USER /opt/libreqos
|
||||
cp /opt/libreqos/src/bin/lqosd.service.example /etc/systemd/system/lqosd.service
|
||||
cp /opt/libreqos/src/bin/lqos_scheduler.service.example /etc/systemd/system/lqos_scheduler.service
|
||||
cp /opt/libreqos/src/bin/lqos_api.service.example /etc/systemd/system/lqos_api.service
|
||||
/bin/systemctl daemon-reload
|
||||
/bin/systemctl daemon-reload || true
|
||||
/bin/systemctl stop lqos_node_manager || true # In case it's running from a previous release
|
||||
/bin/systemctl disable lqos_node_manager || true # In case it's running from a previous release
|
||||
/bin/systemctl enable lqosd lqos_scheduler lqos_api
|
||||
/bin/systemctl start lqosd lqos_scheduler lqos_api
|
||||
/bin/systemctl enable lqosd lqos_scheduler lqos_api || true
|
||||
/bin/systemctl start lqosd lqos_scheduler lqos_api || true
|
||||
EOF
|
||||
|
||||
# Uninstall Script
|
||||
cat <<EOF > postrm
|
||||
#!/bin/bash
|
||||
/bin/systemctl stop lqosd lqos_scheduler lqos_api
|
||||
/bin/systemctl disable lqosd lqos_scheduler lqos_api
|
||||
set +e
|
||||
/bin/systemctl stop lqosd lqos_scheduler lqos_api || true
|
||||
/bin/systemctl disable lqosd lqos_scheduler lqos_api || true
|
||||
/bin/systemctl daemon-reload || true
|
||||
exit 0
|
||||
EOF
|
||||
chmod a+x postinst postrm
|
||||
popd > /dev/null || exit
|
||||
|
||||
Reference in new issue
Block a user