1
0

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

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

44
linux/usr/local/bin/omcd Normal file
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