8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:43:03 +01:00
firebird-mirror/builds/install/misc/restoreRootRunUser.sh.in
2005-04-29 18:16:46 +00:00

40 lines
803 B
Bash

#!/bin/sh
# A routine to change the user that runs interbase Firebird
RunUser=root
RunGroup=root
checkInstallUser
checkIfServerRunning
# Get confirmation
echo ""
echo "Change Firebird install for $FBRootDir to uid=$RunUser gid=$RunGroup"
echo "(User or group options can be changed by editing this script)"
echo ""
AskQuestion "Press return to continue - or ^C to abort"
# Add user and group, if missing
if [ $RunUser != "root" ]
then
addFirebirdUser
fi
# Update the /etc/inetd.conf or xinetd entry or /etc/init.d/firebird
echo "Updating /etc file(s)"
updateInetdServiceEntry
changeInitRunUser
# Update ownership and SUID bits for programs.
echo "Updating $FBRootDir"
fixFilePermissions
# Get inetd to reread new init files, start service.
resetInetdServer
startService
echo "Completed."