Skip to main content

Services and daemons in Linux

WTF is a service or a daemon?


Daemons are a kind of non-interactive process that runs in the background. They basically are detached from the keyboard and display.

Services also do not need a terminal. They run in the background to provide some service like apache.
The service here is the command’s target. Basically, it is the service you want to manage using systemctl.

command What it does?
status Returns the status of the service
start Attempts to start the service 
stop Stops the service
restart Restarts the service
reload Reloads the service’s configuration. This applies the new configuration.
enable Enables autostart on boot
disable Disables autostart on boot

Service’s status


Now, Let’s see the different statuses that every service could have. 

Status Name Status Description
loaded The service’s configuration files have been loaded successfully
active The service is running or waiting for a certain event to run.
inactive The service is not currently running
enabled The service will start at boot
disabled The service will not start at boot

For instance : RHEL 7.x , 8.x
systemctl enable crond
systemctl start/stop/restart crond
systemctl status crond
crontab -e              ## For current logged user
crontab -e -u <user>    ## For particular user
tail -f /var/log/cron   ## To check log



Sample Script for Splunk services restart restart:
#!/bin/sh
cd /opt/splunk/bin
status=`./splunk status`
abc="splunkd is running"
if [ "${status:0:18}" == "$abc" ]
then
   echo "good"
else
cd /opt/splunk/bin
./splunk restart
fi

Comments

Popular posts from this blog

SQL Dorks

-------------------------------------------------------------------------------- Admin 22-05-2014, 08:20 PM cat.asp?-cat= productlist.asp?catalogid= Category.asp?category_id= Category.cfm?category_id= category.asp?cid= category.cfm?cid= category.asp?cat= category.cfm?cat= category.asp?id= index.cfm?pageid= category.asp?catid= Category.asp?c= Category.cfm?c= productlist.cfm?catalogid= productlist.asp?catalogid= viewitem.asp?catalogid= viewitem.cfm?catalogid= catalog.cfm?catalogId= catalog.asp?catalogId= department.cfm?dept= department.asp?dept= itemdetails.cfm?catalogId= itemdetails.asp?catalogId= product_detail.asp?catalogid= product_detail.cfm?catalogid= product_list.asp?catalogid= product_list.cfm?catalogid= ShowProduct.cfm?CatID= ShowProduct.asp?CatID= search_results.cfm?txtsearchParamCat= search_results.asp?txtsearchParamCat= itemdetails.cfm?catalogId= itemdetails.asp?catalogId= store-page.cfm?go= store-page.asp?go= Detail.cfm?CatalogID= Detail.asp?CatalogID= browse.cfm?category_i...

10 BEST LINUX DISTRIBUTION FOR HACKING &PEN TESTING 2020

🔴Use wisely🔴 ⭕️Info:     These Linux distributions offer lots of useful tools for penetration testing, wireless security, forensic, etc.  ✍1. BackTrack 5r3 ✅useful : wireless cracking, exploiting, web application assessment, learning. ✍2. BackBox Linux  ✅Useful: penetration tests and security assessments. It provides all suspects for Forensic Analysis, Documentation & Reporting, Reverse Engineering with John, Nmap, Social Engineering Tool, etc. ✍3. Blackbuntu ✅Useful:   Tools for Information Gathering, Network Mapping, Vulnerability Identification, Penetration, Maintaining Access, radio Network Analysis, Reverse Engineering, etc.  ✍4.Samurai Web Testing Framework ✅Useful: It offers lots of open source and free tools that would help you focus on testing and attacking websites. ✍5. Knoppix STD ✅useful:  live CD and can be installed on a hard disk. The STD stands for Security Tools Distribution. Knoppix provides you a full scenario for cry...

🔰How To Remove Shortcut Virus From Your Pc🔰

✅ Method 1.  - Clean up and remove Shortcut Virus by CMD - 1. Click on  Start  and select  Run; 2. Type: CMD  and Hit Enter to open  Command Prompt; 3. Type the  drive letter  of your hard drive partition in PC or USB flash drive and hit Enter; (G for example.) 4. Type:  attrib g:*.* /d /s -h -r -s  and hit Enter. You’ll be able to see your files and data on Windows PC or USB flash drive now. ✅Method 2.  -Cleanup Shortcut Virus with Shortcut Virus Remover or Anti-virus Software- *If you need a double guarantee, you can download and install anti-virus software to clean up all shortcut virus from Windows 10/8/7 computer and USB etc external storage devices. Here below you’ll see a list of anti-virus software and tools and you can selectively choose one to try* ➡️Trojan Removal Tool; ➡️Shortcut virus fixfolder; ➡️Malwarebytes Anti-Malware, etc. ✅Method 3.  - Delete/Wipe Shortcut Virus from Registry - 1. Press Win+R and type: reged...