reguire gnupg1 on f>=31; sense the system to use gpg1 when installed
[nodemanager.git] / sliver-initscripts / initscript-template.sh
1 #!/bin/bash
2 command=$1; shift
3 slicename=$1; shift
4
5 # that can make sense if needed
6 # source /etc/init.d/functions
7
8 # a reasonably tested function for installing with yum
9 function yum_install () {
10     pkg="$1"; shift
11     while true; do
12         rpm -q $pkg && break
13         sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY 
14         sudo yum -y install $pkg
15         sleep 10
16     done
17     echo $pkg installed
18 }
19
20 ####################
21 function start () {
22     
23 }
24 function stop () {
25
26 }
27
28 ####################
29 function restart () {
30   stop
31   start
32 }
33 case $command in 
34 start) start ;;
35 stop) stop ;;
36 restart) restart ;;
37 *) echo "Unknown command in initscript $command for slice $slicename" ;;
38 esac