#!/bin/bash
if [ "$1" = "start" ];then
chmod 755 /usr/share/phpmyadmin
echo "starting phpmyadmin -> autorise acces au repertoire: chmod 755 /usr/share/phpmyadmin"
exit 0
fi
if [ "$1" = "stop" ];then
chmod 000 /usr/share/phpmyadmin
echo "stoping phpmyadmin -> interdire acces au repertoire: chmod 000 /usr/share/phpmyadmin"
exit 0
fi
if [ "$1" = "status" ];then
perms=$(stat -c %a "/usr/share/phpmyadmin")
if [ $perms = 0 ];then
echo "phpmyadmin is disabled"
fi
if [ $perms = 755 ];then
echo "phpmyadmin is enabled"
fi
exit 0
fi
echo "us
age phpmyadmin start | stop | status" exit 0