diff --git a/linux/lib/systemd/system/omc-exec.service b/linux/lib/systemd/system/omc-exec.service new file mode 100644 index 0000000..1b8f1bb --- /dev/null +++ b/linux/lib/systemd/system/omc-exec.service @@ -0,0 +1,9 @@ +[Unit] +Description=omc execute script daemon + +[Service] +ExecStart=/usr/local/etc/omc/script/omc_exec.sh +Type=oneshot + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/linux/usr/local/etc/omc/script/omc_exec.sh b/linux/usr/local/etc/omc/script/omc_exec.sh new file mode 100644 index 0000000..a9bf588 --- /dev/null +++ b/linux/usr/local/etc/omc/script/omc_exec.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/pkg/deb/DEBIAN/postinst b/pkg/deb/DEBIAN/postinst index 035d371..0d30c6a 100644 --- a/pkg/deb/DEBIAN/postinst +++ b/pkg/deb/DEBIAN/postinst @@ -5,8 +5,8 @@ RootDir=/usr/local/etc/omc # Perform post-installation configuration echo "" echo "Output: $RootDir" -echo "Please Run:" -echo " sudo systemctl start|stop|status|restart omc.service" +echo "Service:" +echo " sudo systemctl [start|stop|status|restart] omc.service" echo "" # Check if this is the first installation or upgrade @@ -55,7 +55,7 @@ else fi systemctl daemon-reload - systemctl start omc.service - systemctl start sshsvc.service + systemctl restart omc.service + systemctl restart sshsvc.service fi echo "" diff --git a/pkg/rpm/SPECS/omc.spec b/pkg/rpm/SPECS/omc.spec index 9860b0e..3619ecd 100644 --- a/pkg/rpm/SPECS/omc.spec +++ b/pkg/rpm/SPECS/omc.spec @@ -32,9 +32,9 @@ RootDir=/usr/local/etc/omc # Perform post-installation configuration echo "" echo "Output: $RootDir" -echo "Please Run:" -echo " sudo systemctl start|stop|status|restart omc.service" -echo "Setting Firewall:" +echo "Service:" +echo " sudo systemctl [start|stop|status|restart] omc.service" +echo "Firewall:" echo " add: " echo " firewall-cmd --zone=public --add-port=80/tcp --permanent && firewall-cmd --reload" echo " remove: " @@ -87,8 +87,8 @@ else fi systemctl daemon-reload - systemctl start omc.service - systemctl start sshsvc.service + systemctl restart omc.service + systemctl restart sshsvc.service fi echo ""