install-as-service   [plain text]

printf "____________________________________________________________\n";
printf "This is a sample script to install Jabberd as a Windows NT\n";
printf "service using the Cygwin utility cygrunsrv.  You can then\n";
printf "control Jabberd as you do any other Windows service, using\n";
printf "commands such as\n\n";
printf "   net start jabberd\n";
printf "   net stop  jabberd\n\n";
printf "or accessing Jabberd via the MMC GUI.\n\n";
printf "Please note the example provided herein assumes the following:\n\n";
printf "* You have created a Windows user 'jabber' under which\n";
printf "  context you will run Jabberd.\n";
printf "* You have Jabberd installed in /usr/local/jabber/ \n";
printf "* You have made sure the files and folders related to Jabberd\n";
printf "  are owned by the Windows user 'jabber'\n";
printf "  (Otherwise you will experience all kinds of issues.)\n";
printf "____________________________________________________________\n\n";
printf "Press [Enter] when ready\n";
read input

cygrunsrv --install jabberd --path /usr/local/jabber/jabberd/jabberd --chdir /usr/local/jabber --disp "JABBER Server" --user jabber --shutdown