i have this startup script under fedora running fine
#!/bin/sh -e export P4JOURNAL=/var/log/perforce/journal export P4LOG=/var/log/perforce/p4err export P4ROOT=/var/local/perforce export P4PORT=1666 PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" p4start="p4d -d" p4stop="p4 admin stop" p4user=perforce case "$1" in start) #NOTE: in original, havent found RedHat equiv or source to include # Havent found . /lib/lsb/init-functions #log_action_begin_msg "Starting Perforce Server" echo "starting perforce server from script..." $p4start; ;; stop) # see above #log_action_begin_msg "Stopping Perforce Server" echo "stoping perforce server from script" $p4stop; ;; restart) $p4stop; $p4start; ;; *) echo "Usage: /etc/init.d/perforce (start|stop|restart)" exit 1 ;; esac
but it won't work at ubuntu, not sure what went wrong.(p4d and p4 are both in /usr/local/bin)
Any help will be appreciated.
i got this using sh -x
starting perforce server from script... + p4d -d + exit 0
the result seems right, but p4d not running.