Project

General

Profile

« Previous | Next » 

Revision 5e5c72be

Added by Frank Wall about 11 years ago

support symlinked RC scripts from PBI packages

View differences:

etc/inc/service-utils.inc
50 50
	global $g;
51 51

  
52 52
	$rcfile_fullname = RCFILEPREFIX . $params['file'];
53
	if (!file_exists($rcfile_fullname) && !touch($rcfile_fullname))
53
	if (!file_exists($rcfile_fullname) && !is_link($rcfile_fullname) && !touch($rcfile_fullname))
54 54
		return false;
55 55

  
56 56
	if (!is_writable($rcfile_fullname) || empty($params['start']))
......
100 100
					if (!empty($service['prefix'])) {
101 101
						$prefix =& $service['prefix'];
102 102
					}
103
					if(file_exists("{$prefix}{$service['rcfile']}")) {
103
					if(file_exists("{$prefix}{$service['rcfile']}") || is_link("{$prefix}{$service['rcfile']}")) {
104 104
						mwexec_bg("{$prefix}{$service['rcfile']} start");
105 105
					}
106 106
				}
......
126 126
					if(!empty($service['prefix'])) {
127 127
						$prefix =& $service['prefix'];
128 128
					}
129
					if(file_exists("{$prefix}{$service['rcfile']}")) {
129
					if(file_exists("{$prefix}{$service['rcfile']}") || is_link("{$prefix}{$service['rcfile']}")) {
130 130
						mwexec("{$prefix}{$service['rcfile']} stop");
131 131
					}
132 132
					return;

Also available in: Unified diff