403Webshell
Server IP : 13.213.54.232  /  Your IP : 216.73.216.30
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/246939/root/lib/ec2-hibinit-agent/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/246939/root/lib/ec2-hibinit-agent/hibinit-resume
#!/bin/bash
#
# Resume from hibernation on EC2 and apply workarounds for various issues
#
# Copyright (C) 2020 Canonical Ltd.
#

set -e

# Starting hibinit resume actions
echo "hibinit-resume: begin" >> /var/log/hibinit-resume.log

# Give some time to make sure the system is fully up and running, see LP: #1864041
sleep 2

# Make sure the network is properly resumed
echo "restarting network" >> /var/log/hibinit-resume.log
if grep -q xen_netfront /proc/modules; then
    # Xen netfront workaround LP: #1864041
    modprobe -r xen_netfront
    modprobe xen_netfront
fi
systemctl restart --no-block systemd-networkd

# Temporarily set memory allocation policy to "always overcommit". With
# the default overcommit policy some applications might experience
# out-of-memory errors. Setting the policy to "always overcommit" seems
# to be a safe way to prevent these errors.
OVERCOMMIT_POLICY=$(cat /proc/sys/vm/overcommit_memory)
echo 1 > /proc/sys/vm/overcommit_memory
# Start swapoff and make sure swap file is gone
while :; do
    echo "starting swapoff" >> /var/log/hibinit-resume.log
    swapoff /swap-hibinit
    if grep -q swap-hibinit /proc/swaps; then
        echo "swap still active" >> /var/log/hibinit-resume.log
        sleep 10
    else
        break
    fi
done
echo "swap disabled" >> /var/log/hibinit-resume.log
cat /proc/swaps >> /var/log/hibinit-resume.log
# Restore previou overcommit policy
echo "$OVERCOMMIT_POLICY" > /proc/sys/vm/overcommit_memory

# All done
echo "hibinit-resume: completed " >> /var/log/hibinit-resume.log

Youez - 2016 - github.com/yon3zu
LinuXploit