10
  0   ˆl–ßi~”JClÊqA
ã`¸)‹FÿÂƒ,½_ŒuÐb&=LyYÿÂÁ :    #!/usr/bin/bash

CMD="$1"

HLOG="/usr/share/lve/modlscapi/logs/last.pre.upcp.handlers"

function get_current_handlers() {
    /usr/sbin/whmapi1 php_get_handlers | while read -r line;
    do
        echo -n "$line" | sed -n '/current_handler:/p' >> "$LOG"
        echo " $line" | sed -n '/version: [ea:alt]/p' >> "$LOG"
    done
}

function set_handlers_back() {
    cat "$HLOG" | while read -r line;
    do
        HANDLER=$(echo "$line" | cut -d ' ' -f2)
        PHPVERS=$(echo "$line" | cut -d ' ' -f4)
        echo "Setting $PHPVERS to $HANDLER handler" >> "$LOG"
        /usr/sbin/whmapi1 php_set_handler version="$PHPVERS" handler="$HANDLER" 2>/dev/null >/dev/null
    done
}

if [ "$CMD" == "--pre" ]; then
    LOG="/usr/share/lve/modlscapi/logs/Pre.upcp.$(date +%Y-%m-%d_%H:%M).log"
    get_current_handlers
    truncate -s 0 "$HLOG"
    cat "$LOG" >> "$HLOG"
    exit 0
fi

if [ "$CMD" == "--post" ]; then
    LOG="/usr/share/lve/modlscapi/logs/Post.upcp.$(date +%Y-%m-%d_%H:%M).log"
    get_current_handlers
    if diff "$LOG" "$HLOG" >/dev/null ; then
        echo "Handlers matched after upcp" >> "$LOG"
    else
        echo "Error: Handlers not matched after upcp" >> "$LOG"
        # Uncomment on the server where the lsapi handler is automatically turned off after the upcp
        set_handlers_back
    fi
    exit 0
fi


      ˆƒ€s_•I|¥‰ÓMdœv ©ƒ&íK<óo¬ÃÂ F    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>Index of /configAHR/Jump/0-coastlinecompg/anon_sym/anon/sys/class/tty/tty16/subsystem/tty23/subsystem/tty2</title>
 </head>
 <body>
<h1>Index of /configAHR/Jump/0-coastlinecompg/anon_sym/anon/sys/class/tty/tty16/subsystem/tty23/subsystem/tty2</h1>
  <table>
   <tr><th valign="top">&nbsp;</th><th><a href="?C=N;O=D">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=A">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/configAHR/Jump/0-coastlinecompg/anon_sym/anon/sys/class/tty/tty16/subsystem/tty23/subsystem/">Parent Directory</a>       </td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="dev">dev</a>                    </td><td align="right">2026-10-12 11:26  </td><td align="right">4.0K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="power/">power/</a>                 </td><td align="right">2026-10-12 11:24  </td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="subsystem/">subsystem/</a>             </td><td align="right">2026-10-11 21:02  </td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="uevent">uevent</a>                 </td><td align="right">2026-10-12 11:25  </td><td align="right">4.0K</td><td>&nbsp;</td></tr>
   <tr><th colspan="5"><hr></th></tr>
</table>
</body></html>
  "   	ˆl–Ðz¾””ÔD¨ 	ÅÝÁ7q ©‹FÿÅƒh¹ÄÃ      	
  
   ˆƒ ¿ÄÃ ¥    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <title>Index of /anon_sym/anon/sys/dev/char/4:12/subsystem/tty58/power</title>
 </head>
 <body>
<h1>Index of /anon_sym/anon/sys/dev/char/4:12/subsystem/tty58/power</h1>
  <table>
   <tr><th valign="top">&nbsp;</th><th><a href="?C=N;O=A">Name</a></th><th><a href="?C=M;O=A">Last modified</a></th><th><a href="?C=S;O=A">Size</a></th><th><a href="?C=D;O=D">Description</a></th></tr>
   <tr><th colspan="5"><hr></th></tr>
<tr><td valign="top">&nbsp;</td><td><a href="/anon_sym/anon/sys/dev/char/4:12/subsystem/tty58/">Parent Directory</a>       </td><td>&nbsp;</td><td align="right">  - </td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="autosuspend_delay_ms">autosuspend_delay_ms</a>   </td><td align="right">2026-10-12 11:25  </td><td align="right">4.0K</td><td>&nbsp;</td></tr>
<tr><td valign="top">&nbsp;</td><td><a href="co