feat: 添加OMC服务控制脚本并移除过时的脚本文件

This commit is contained in:
TsMask committed 2025-04-21 16:09:21 +08:00
1 parent fb021f4605
commit 38f6652301
11 files changed
+262 -488

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
ServiceList="omc sshsvc"
case "$1" in
start)
for v in $ServiceList;do
systemctl start $v
if [ $? = 0 ]; then
echo "starting $v process done"
fi
sleep 1
done
;;
status)
for v in $ServiceList;do
systemctl status $v
done
;;
stop)
for v in $ServiceList;do
systemctl stop $procName
if [ $? = 0 ]; then
echo "Stopping $v process done"
fi
done
;;
restart)
$0 stop
sleep 1
$0 start
;;
version)
local BinDir=/usr/local/bin
for v in $ServiceList;do
$BinDir/$v --version
done
;;
*)
echo "OMC Service Control"
echo "Usage: $0 start|status|stop|restart|version"
echo ""
;;
esac