Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Created June 7, 2014 15:11
Show Gist options
  • Save yuuichi-fujioka/c4388cc672a3c8188423 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/c4388cc672a3c8188423 to your computer and use it in GitHub Desktop.
install start-stop-daemon to centos, fedora, redhat.
#!/bin/bash
cd /usr/local/src
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /usr/sbin/
@guodage
Copy link

guodage commented Aug 16, 2017

thanks

@JamesCullum
Copy link

Cleaner version, that removes all temporary files and doesn't change the working directory

#!/bin/bash
# Download file
wget -O ~/start-stop-daemon.tar.gz http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz

# Extract the directory
mkdir ~/start-stop-daemon
tar zxvf ~/start-stop-daemon.tar.gz -C ~/start-stop-daemon

# Compile and move executable
gcc ~/start-stop-daemon/apps/sys-utils/start-stop-daemon-IR1_9_18-2/start-stop-daemon.c -o ~/start-stop-daemon/start-stop-daemon
cp ~/start-stop-daemon/start-stop-daemon /usr/sbin/

# Clean up
rm -rf ~/start-stop-daemon
rm -f ~/start-stop-daemon.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment