mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-08-15 02:15:59 -07:00
17 lines
413 B
Bash
Executable file
17 lines
413 B
Bash
Executable file
#!/bin/bash
|
|
source /etc/profile
|
|
the_path=`realpath $0`
|
|
gxg_root=`dirname "$the_path"`
|
|
cd $gxg_root
|
|
if [ "$1" == "start" ]
|
|
then
|
|
touch "$gxg_root/System/Temporary/server.tty"
|
|
/bin/stty --file="$gxg_root/System/Temporary/server.tty"
|
|
sudo -u www-data ./server start --quiet
|
|
fi
|
|
if [ "$1" == "stop" ]
|
|
then
|
|
sudo -u www-data ./server stop
|
|
/bin/rm -rf "$gxg_root/System/Temporary/server.tty"
|
|
fi
|
|
exit 0
|