fix: 升级配置目录放置
This commit is contained in:
@@ -40,6 +40,13 @@ if [ ! -f $RootDir/machine.ini ]; then
|
|||||||
systemctl restart sshsvc.service
|
systemctl restart sshsvc.service
|
||||||
else
|
else
|
||||||
# Operation when upgrading
|
# 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
|
||||||
|
|
||||||
bash $RootDir/script/setup.sh -u
|
bash $RootDir/script/setup.sh -u
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ echo " firewall-cmd --zone=public --remove-port=80/tcp --permanent && firewal
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Check if this is the first installation or upgrade
|
# Check if this is the first installation or upgrade
|
||||||
if [ ! -f $RootDir/omc.conf ]; then
|
if [ ! -f $RootDir/machine.ini ]; then
|
||||||
# First installation, perform the related operations
|
# First installation, perform the related operations
|
||||||
chmod +rx /usr/local/bin/omc
|
chmod +rx /usr/local/bin/omc
|
||||||
cp $RootDir/default/omc.conf $RootDir/omc.conf
|
cp $RootDir/default/omc.conf $RootDir/omc.conf
|
||||||
@@ -72,6 +72,13 @@ if [ ! -f $RootDir/omc.conf ]; then
|
|||||||
systemctl restart sshsvc.service
|
systemctl restart sshsvc.service
|
||||||
else
|
else
|
||||||
# Operation when upgrading
|
# 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
|
||||||
|
|
||||||
bash $RootDir/script/setup.sh -u
|
bash $RootDir/script/setup.sh -u
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user