Skip to content

Instantly share code, notes, and snippets.

@evaristorivi
Created November 18, 2018 18:53
Show Gist options
  • Save evaristorivi/ac36dcebc7492b3c801e6f1445c1def6 to your computer and use it in GitHub Desktop.
Save evaristorivi/ac36dcebc7492b3c801e6f1445c1def6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment