1
0

feat: 将sshsvc移除

This commit is contained in:
TsMask
2025-07-16 15:46:20 +08:00
parent 6ab25532e5
commit f925645b88
14 changed files with 11 additions and 63 deletions

View File

@@ -15,7 +15,6 @@ if [ ! -f $RootDir/machine.ini ]; then
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
# read environment parameter and to do
@@ -34,19 +33,20 @@ if [ ! -f $RootDir/machine.ini ]; then
systemctl daemon-reload
systemctl enable omc.service
systemctl enable sshsvc.service
systemctl daemon-reload
systemctl restart omc.service
systemctl restart sshsvc.service
else
# Operation when upgrading
if [ ! -f $RootDir/omc.conf ]; then
chmod +rx /usr/local/bin/omc
cp $RootDir/default/omc.conf $RootDir/omc.conf
cp $RootDir/default/omc.yaml $RootDir/omc.yaml
cp $RootDir/default/sshsvc.yaml $RootDir/sshsvc.yaml
cp $RootDir/web/default/config.js $RootDir/web/config.js
fi
# Override Configuration
if ! grep -q "# route service configuration" $RootDir/omc.yaml; then
cp -rf $RootDir/default/omc.yaml $RootDir/omc.yaml
fi
bash $RootDir/script/setup.sh -u
if [ $? -ne 0 ]; then
@@ -56,6 +56,5 @@ else
systemctl daemon-reload
systemctl restart omc.service
systemctl restart sshsvc.service
fi
echo ""

View File

@@ -8,9 +8,7 @@ case "$1" in
# Deletion of service files
systemctl daemon-reload
systemctl disable omc.service
systemctl disable sshsvc.service
rm -rf /lib/systemd/system/omc.service
rm -rf /lib/systemd/system/sshsvc.service
systemctl daemon-reload
# Removal of relevant documents

View File

@@ -4,4 +4,3 @@
# Stop Service
systemctl daemon-reload
systemctl stop omc.service
systemctl stop sshsvc.service