Help with a bash command

Associate
Joined
19 Jul 2006
Posts
1,847
Im trying to get Apache2 and mysql to start when the server is started. Im using openSUSE. And found these instructions on the net

I have logged on as root.

vi /etc/init.d/Mattsstartupscript


Code:
#! /bin/bash

/usr/sbin/rcapache2 start
/usr/sbin/mysql start

echo "Apache and Coldfusion started"

That is as far as I get How do i get the file to save.
I get a error saying "/ect/init.d/mattstartupscript" E212: Cannot open file for writing

Then exit and save it: ctrl+x

chmod 755 /etc/init.d/scriptname

then launch yast2 and goto system->runlevel editor and advanced.
set runlevel 3 or 5 or both for it and launch it.
Hope this worked.
 
Is that a typo in your command or a typo on the error message? That would explain the error message (/ect doesn't exist).

<pedantic>Ctrl+x doesn't save and exit in vi: you'll need to press <Esc>:wq to do that.</pedantic>
 
Back
Top Bottom