Quellcode durchsuchen

small fixes for softaculous plugin enable/disable

Serghey Rodin vor 8 Jahren
Ursprung
Commit
351d2a78cf
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
  1. 7 3
      bin/v-add-vesta-softaculous
  2. 2 1
      bin/v-delete-vesta-softaculous

+ 7 - 3
bin/v-add-vesta-softaculous

@@ -98,6 +98,8 @@ fi
 
 # Installing softaculous
 if [ ! -e "$VESTA/softaculous/vst_installed" ]; then
+    mkdir -p /var/softaculous
+    chown -R admin:admin /var/softaculous
     cd $VESTA/softaculous
     wget -q http://c.vestacp.com/3rdparty/softaculous_install.inc
     $VESTA/php/bin/php softaculous_install.inc
@@ -105,9 +107,11 @@ if [ ! -e "$VESTA/softaculous/vst_installed" ]; then
     touch $VESTA/softaculous/vst_installed
 fi
 
-# Adding symlink
-if [ ! -e "$VESTA/web/softaculous" ]; then
-    ln -s $VESTA/softaculous/vesta $VESTA/web/softaculous
+# Enabling symlink
+if [ -e "$VESTA/disabled_plugins/softaculous" ]; then
+    if [ ! -e "$VESTA/web/softaculous" ]; then
+        mv $VESTA/disabled_plugins/softaculous $VESTA/web/softaculous
+    fi
 fi
 
 # Updating SOFTACULOUS value

+ 2 - 1
bin/v-delete-vesta-softaculous

@@ -29,7 +29,8 @@ fi
 
 # Deleting symlink
 if [ -e "$VESTA/web/softaculous" ]; then
-    rm -f $VESTA/web/softaculous
+    mkdir -p $VESTA/disabled_plugins
+    mv $VESTA/web/softaculous $VESTA/disabled_plugins
 fi
 
 # Updating SOFTACULOUS value