otrs/init

25 lines
729 B
Plaintext
Raw Normal View History

2019-03-29 23:54:00 +00:00
#!/bin/sh
OTRS_SOCK_DIR=/var/run/otrs
NGINX_USER=nginx
# Make our CGI socker
mkdir ${OTRS_SOCK_DIR}
chown ${NGINX_USER} ${OTRS_SOCK_DIR}
su ${NGINX_USER} -s /bin/sh -c "/usr/bin/fcgiwrap -fs unix:${OTRS_SOCK_DIR}/otrs.cgi.sock" &
ln -s /otrs/Config.pm /opt/otrs/Kernel/Config.pm
ln -s /otrs/Files/ZZZAAuto.pm /opt/otrs/Kernel/Files/
ln -s /otrs/Files/ZZZACL.pm /opt/otrs/Kernel/Files/
ln -s /otrs/Files/ZZZProcessManagement.pm /opt/otrs/Kernel/Files/
2019-03-29 23:54:00 +00:00
# Install OTRS Modules
su otrs -lc "bin/otrs.Console.pl Maint::Config::Rebuild; bin/otrs.Console.pl Admin::Package::ReinstallAll"
2019-03-29 23:54:00 +00:00
# Start cron and the OTRS Daemon
/usr/sbin/crond
/opt/otrs/bin/Cron.sh start otrs
# Finally start NGINX
exec /usr/sbin/nginx "-g daemon off;"