403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/munin-master/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/munin-master/pkg-deinstall
#! /bin/sh
# ex:sw=4 sts=4

ask() {
    local question default answer

    question=$1
    default=$2
    if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]
    then
	read -p "${question} [${default}]? " answer
    fi
    if [ x${answer} = x ]
    then
	answer=${default}
    fi
    echo ${answer}
}

yesno() {
    local dflt question answer

    question=$1
    dflt=$2
    while :; do
	answer=$(ask "${question}" "${dflt}")
	case "${answer}" in
	[Yy]*)		return 0;;
	[Nn]*)		return 1;;
	esac
	echo "Please answer yes or no."
    done
}

delete_crontab_entries() {
    local b e
    b=$1
    e=$2

    TMPFILE=`mktemp -t munin` || exit 1
    crontab -u munin -l | sed -e "/^$b\$/,/^$e\$/d" -e '/^[ 	]*#/d' -e '/^$/d' > $TMPFILE
    if [ -s $TMPFILE ]
    then
	crontab -u munin -l | sed -e "/^$b\$/,/^$e\$/d" | crontab -u munin -
	echo "The crontab for user munin had manually created entries."
	echo "Only the automatically created entries have been removed."
	echo "These are the remaining lines:"
	crontab -u munin -l
    else
	echo y | crontab -u munin -r
	echo "crontab for user munin removed"
    fi
    rm $TMPFILE
}

case $2 in
    DEINSTALL)
	if [ -z "${PACKAGE_BUILDING}" ]
	then
	    delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN'
	fi
	;;
esac

Youez - 2016 - github.com/yon3zu
LinuXploit