Created
November 13, 2012 12:15
-
-
Save clowder/4065462 to your computer and use it in GitHub Desktop.
Runit RPM (using fpm)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y install glibc-static | |
export DESTDIR="/tmp/runit_installdir" | |
rm -rf $DESTDIR | |
mkdir $DESTDIR | |
cd $DESTDIR | |
mkdir -p ./package ./service ./sbin ./usr/local/bin ./etc/init | |
echo -e """# for runit - manage /usr/sbin/runsvdir-start | |
start on runlevel 2 | |
start on runlevel 3 | |
start on runlevel 4 | |
start on runlevel 5 | |
stop on shutdown | |
respawn | |
exec /sbin/runsvdir-start | |
""" > ./etc/init/runsvdir.conf | |
chmod 1755 ./package | |
cd ./package | |
wget http://smarden.org/runit/runit-2.1.1.tar.gz | |
tar xpzf runit-2.1.1.tar.gz | |
rm runit-2.1.1.tar.gz | |
cd admin/runit-2.1.1 | |
package/compile | |
# package/install variation | |
ln -s runit-2.1.1 runit | |
mv -f runit .. | |
for i in `cat package/commands`; do | |
ln -s /package/admin/runit/command/$i $DESTDIR/usr/local/bin/$i | |
done | |
install -m0750 $DESTDIR/package/admin/runit-2.1.1/etc/2 $DESTDIR/sbin/runsvdir-start | |
cd ~/ | |
rm post-install.sh | |
wget https://raw.github.com/gist/4065462/9afdaa6be3f74d48e1885e6c0ab180bf29ce5546/post-install.sh | |
fpm -s dir -t rpm -C $DESTDIR --name runit --version 2.1.1 --post-install ~/post-install.sh ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start runsvdir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment