Bug 22396: Make koha-sip set KOHA_HOME and KOHA_CONF correctly
[koha.git] / debian / scripts / koha-sip
index da6909b..57ad478 100755 (executable)
@@ -64,7 +64,8 @@ start_sip()
     if ! is_sip_running $name; then
 
         adjust_paths_dev_install $name
-        export KOHA_CONF PERL5LIB
+        export KOHA_HOME PERL5LIB
+
         if [ "$DEV_INSTALL" = "" ]; then
             LIBDIR=$KOHA_HOME/lib
         else
@@ -229,6 +230,8 @@ if [ "$used_script_name" != "koha-sip" ]; then
             set_action "start" ;;
         koha-stop-sip)
             set_action "stop" ;;
+        koha-enable-sip)
+            set_action "enable" ;;
         *)
             break ;;
     esac
@@ -274,6 +277,8 @@ if [ $# -gt 0 ]; then
 
         if is_instance $name; then
 
+            export KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml"
+
             case $op in
                 "start")
                     start_sip $name