add backup

This commit is contained in:
tianyu 2014-11-13 14:53:16 +08:00
parent 245ea6641b
commit 4b9167ec3d
1 changed files with 9 additions and 5 deletions

View File

@ -126,11 +126,15 @@ if [ -d "/$ETCDIR/$BINNAME" ];then
echo "install $BINNAME.init to /$ETCDIR/init.d/$BINNAME..." echo "install $BINNAME.init to /$ETCDIR/init.d/$BINNAME..."
cp $ETCDIR/init.d/$BINNAME.init /$ETCDIR/init.d/$BINNAME cp $ETCDIR/init.d/$BINNAME.init /$ETCDIR/init.d/$BINNAME
chmod +x /$ETCDIR/init.d/$BINNAME chmod +x /$ETCDIR/init.d/$BINNAME
if [ -n $(command -v apt-get) ]; then if [ -n "$(command -v apt-get)" ]; then
bash $ETCDIR/$BINNAME.postinst configure if [ -f "$ETCDIR/$BINNAME.postinst" ]; then
elif [ -n $(command -v yum) ]; then bash $ETCDIR/$BINNAME.postinst configure
bash $ETCDIR/$BINNAME.postinst configure fi
passwd -l opensips elif [ -n "$(command -v yum)" ]; then
if [ -f "$ETCDIR/$BINNAME.postinst" ]; then
bash $ETCDIR/$BINNAME.postinst configure
passwd -l opensips
fi
fi fi
fi fi
cp -r $ETCDIR/$BINNAME /$ETCDIR cp -r $ETCDIR/$BINNAME /$ETCDIR