403Webshell
Server IP : 34.87.99.72  /  Your IP : 216.73.217.31
Web Server : Apache/2.4.46 (Unix) OpenSSL/1.1.1n
System : Linux zlock-bitnami-lamp-prod-v2-vm 4.19.0-16-cloud-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64
User : bitnami ( 1000)
PHP Version : 7.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /opt/bitnami/var/init/pre-start/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/bitnami/var/init/pre-start/030_swap_file
#!/bin/sh
#
# Creates swap file in micro instances
# Copyright 2021 Bitnami.com All Rights Reserved
#

. /opt/bitnami/scripts/init/functions

SWAPFILE=/mnt/.bitnami.swap
SWAPSIZE=650000

configure_swap () {
  ephemeral_mount_available=$(df -kP '/mnt' | tail -1 |awk '{print $4}')
  if !(swapon -s | grep -q $SWAPFILE) && test $SWAPSIZE -lt ${ephemeral_mount_available}; then
    rm -f $SWAPFILE
    dd if=/dev/zero of=$SWAPFILE bs=1K count=$SWAPSIZE
    chmod 0600 $SWAPFILE
    mkswap $SWAPFILE
    swapon $SWAPFILE
  fi
}


instance_type=`get_generic_instance_type`
if [ "x$instance_type" = "xmicro" ] || [ "x$1" = "x--force" ]; then
  configure_swap
else
  rm -f $SWAPFILE
fi

Youez - 2016 - github.com/yon3zu
LinuXploit