Startup script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Startup script
# 1  
Old 08-19-2016
Startup script

I can't quite find a clear answer on how to properly write a start up script. Does anybody have any ideas??
# 2  
Old 08-19-2016
What operating system are you using?

What shell are you using?

And, what are you trying to start with your startup script?
# 3  
Old 08-19-2016
Please elaborate on your requirement.
Also, kindly provide the code (if any) which you have written so far
# 4  
Old 08-19-2016
@ Don Cragun

I am using Kali Rolling, and I'm also using BASH as the shell. I'm trying to use ufw on start-up but I'm not quite sure how.

---------- Post updated at 02:43 PM ---------- Previous update was at 02:38 PM ----------

@ H squared

It's not so much of a "requirement" as it is something that would be extremely convenient. The only code that I've written is just a simple BASH script, as I normally would write one.

Code:
#!/bin/bash

 # Boot UFW and change MAC on start-up


sudo ufw enable

sudo ifconfig wlan0 down

sudo macchanger -A

It's super simple, and I've tried a few different things, but nothing seems to work. I'm unsure as how to proceed.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Script not running at startup

I am having check.sh script and check.service which I include to /etc/systemd/system/ chmod 744 /usr/local/bin/check.sh chmod 664 /etc/systemd/system/check.service systemctl daemon-reload systemctl enable check.servicecheck.sh: websockify 5555 localhost:7000 & date >... (9 Replies)
Discussion started by: tomislav91
9 Replies

2. Shell Programming and Scripting

Startup script problem

The attached file is a copy of my rc.local. The rc.local script appears to execute as the tightvncserver gets started. However the nodemon process does not start. The element nodemon is a symlink to nodemon and the path is correct. I have a little start script located in the... (3 Replies)
Discussion started by: barrygordon
3 Replies

3. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

4. Red Hat

running my own script during startup

Hi, I am using scientific linux with is a red hat cloning. I have written a script and I want it to be run during startup before the user log in. How do I do that? I know that there is some connection to the run level and the directory /etc/rc.d. But I don't know how exactly to do it ?... (4 Replies)
Discussion started by: programAngel
4 Replies

5. AIX

startup script

Hi I need the below script to be started whenever I reboot my aix server ? #cat cdbegin /cdirect/cdunix/ndm/bin/cdpmgr -i /cdirect/cdunix/ndm/cfg/cbspsdb01/initparm.cfg Please suggest how to add this to the startup ? (2 Replies)
Discussion started by: samsungsamsung
2 Replies

6. Solaris

how to put script in startup

Hi All, O/S: Solaris 5.10 Software installed :- Oracle 10G Weblogic 10.30 the problem i face that when the server restart for any reason SQL> exit bash-3.00# sqlplus sys/manchester as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Sun May 2 11:04:50 2010 Copyright (c)... (3 Replies)
Discussion started by: xxmasrawy
3 Replies

7. UNIX for Dummies Questions & Answers

Startup Script Somewhere ?

Hello there! I need help. Everytime I login to my ssh, i see this: -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found -bash: .export: command not found any help ? thanks (0 Replies)
Discussion started by: fbauto1
0 Replies

8. AIX

Startup script and services

Guy's What the exact steps to mention for example this script /usr/start/start.sh to be as start up script , I want it to be automatically started when I reboot the server . (8 Replies)
Discussion started by: ITHelper
8 Replies

9. Shell Programming and Scripting

Startup script

New in Unix, I am adding a line "route add 57.14.y.y 57.14.x.x" every day after rebooting the system. Where can I add the line so during boot up (the system is re-started every day by design (???) the line is executed? (I tried the /etc/rc2.d/S90 but for some reason the line needs to be added... (2 Replies)
Discussion started by: texaspanama
2 Replies
Login or Register to Ask a Question