HEX
Server: Apache/2.2.22 (Debian)
System: Linux martin 3.2.0-6-amd64 #1 SMP Debian 3.2.102-1 x86_64
User: otzyv-tut.ru (515)
PHP: 7.1.20
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //usr/share/wwwconfig-common/autopatch_all.sh
#!/bin/sh
# File:		autopatch_all.sh
# Changes:
#      	20010219 Ola Lundqvist <[email protected]>
#	20011022 Luca De Vitis <[email protected]>
#		Introduced the error variable.
#	        Changed from "find ... -exec" to "find ... | while read etc."
#	20020116 Ola Lundqvist <[email protected]>
#		Documented the error variable.
#		Fixed the patch while string.
#	20020412 Ola Lundqvist <[email protected]>
#		Indentation fixes.
# Needs:	$patchdir - Where the patches are located.
# Description:	Finds patches in a directory and applies them to the filesystem.
# Sets:		$status = {error, nothing, patch}
#		$error = error message (if $status = error)

status=error
error=""

if [ -z "$patchdir" ] ; then
    error="No patch directory specified."
else
    status=nothing
    if [ -d $patchdir ] ; then
	WWD=$PWD
	cd /
	find $patchdir -name "*.patch" | {
	    while read file; do
		/usr/share/wwwconfig-common/autopatch.sh $file
	    done
	}
	cd $WWD
    fi
fi