feat: 将sshsvc移除
This commit is contained in:
@@ -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 ""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,4 +4,3 @@
|
||||
# Stop Service
|
||||
systemctl daemon-reload
|
||||
systemctl stop omc.service
|
||||
systemctl stop sshsvc.service
|
||||
|
||||
Reference in New Issue
Block a user