403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
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/torque/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/torque/files/torque-config.in
#!/bin/sh -e

usage()
{
    printf "Usage: $0 head|compute\n"
    exit 1
}

if [ $# != 1 ]; then
    usage
fi
node_type=$1

if [ $node_type != 'head' ] && [ $node_type != 'compute' ]; then
    usage
fi

spool_root=/var/spool

if [ -e $spool_root/torque ]; then
    printf "$spool_root/torque already exists.  Aborting...\n"
    exit 1
fi

cp -Rp %%PREFIX%%/share/examples/torque/var/spool/torque $spool_root
for dir in checkpoint spool undelivered; do
    chmod 1777 $spool_root/torque/$dir
done

cat << EOM
===========================================================================
Enter the hostname of the torque server.  This should be resolved by
/etc/hosts on all nodes.  A short hostname is preferred.
===========================================================================
EOM
read server_hostname
echo $server_hostname > $spool_root/torque/server_name

case $node_type in
'head')
    vi $spool_root/torque/server_priv/nodes
    if ! fgrep -q 'pbs_server_enable="YES"' /etc/rc.conf; then
	printf 'pbs_server_enable="YES"\n' >> /etc/rc.conf
    fi
    if ! fgrep -q 'pbs_sched_enable="YES"' /etc/rc.conf; then
	printf 'pbs_sched_enable="YES"\n' >> /etc/rc.conf
    fi
    %%PREFIX%%/share/examples/torque/torque.setup root
    %%PREFIX%%/etc/rc.d/pbs_server restart
    %%PREFIX%%/etc/rc.d/pbs_sched restart
    ;;
'compute')
    printf "Torque server IP address? "
    read server_ip
    printf '$pbsserver %s /var/spool/torque/mom_priv/config' $server_ip \
	> $spool_root/torque/mom_priv/config
    if ! fgrep -q 'pbs_mom_enable="YES"' /etc/rc.conf; then
	printf 'pbs_mom_enable="YES"\n' >> /etc/rc.conf
    fi
    %%PREFIX%%/etc/rc.d/pbs_mom restart
    ;;
esac


Youez - 2016 - github.com/yon3zu
LinuXploit