Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

keep services up no matter what

function finish {
    # re-start service
    sudo /etc/init.d/something start
}
trap finish EXIT
sudo /etc/init.d/something stop
# Do the work...

# Allow the script to end and the trapped finish function to start the
# daemon back up.
Comment

PREVIOUS NEXT
Code Example
Shell :: how to install MTAG IN LINUX 
Shell :: lz4 compression directory 
Shell :: git push to different local folder 
Shell :: powershell ssh key permissions 
Shell :: how to edit bash rc file 
Shell :: how to change the terminal start in directory 
Shell :: How to translate to md5 linux 
Shell :: Access remote server via PCManFM 
Shell :: fix kali linux asking to restart services 
Shell :: onefetch install 
Shell :: node get git hash 
Shell :: start automount daemon aix 
Shell :: remove detached disk from raid array linux 
Shell :: unbinding a mac to AD terminal 
Shell :: zsh move file 
Shell :: |select name and description powershell 
Shell :: nohup change output file name 
Shell :: docker error "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. 
Shell :: sed variable instead of file 
Shell :: brew install keepnote 
Shell :: kali linux disable root command 
Shell :: navigate to previous directory (DIR) 
Shell :: hide active app from dock 
Shell :: ffmpeg linux capture desktop 
Shell :: postgre create user 
Shell :: bash how to turn into root 
Shell :: powershell merge csv files 
Shell :: gparted 
Shell :: how to uninstall photos app in windows 10 
Shell :: how to exclude .ide directory in gitignore 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =