mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-22 09:26:27 +02:00
Fix rights, add confs apache, add prototype of systemd confs, add scripts to start and stop raspisms
This commit is contained in:
parent
aa3189bfaa
commit
89d786a730
45 changed files with 95 additions and 2 deletions
27
bin/start.sh
Executable file
27
bin/start.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Script to start RaspiSMS daemons
|
||||
#
|
||||
PID_DIR="/var/run/raspisms/"
|
||||
LOG_FILE="/var/log/raspisms.log"
|
||||
SCRIPT=$(readlink -f "$0")
|
||||
RASPISMS_DIR=$(readlink -f "${SCRIPT%/*}/../")
|
||||
CONSOLE_PATH="$RASPISMS_DIR/console.php"
|
||||
COMMAND="php $CONSOLE_PATH controllers/internals/Console.php launcher"
|
||||
|
||||
#Create PID DIR IF NOT EXISTS
|
||||
if [ ! -d $PID_DIR ]
|
||||
then
|
||||
mkdir $PID_DIR
|
||||
fi
|
||||
|
||||
#Create log file if not exists
|
||||
if [ ! -f $LOG_FILE ]
|
||||
then
|
||||
touch $LOG_FILE
|
||||
chmod 777 $LOG_FILE
|
||||
fi
|
||||
|
||||
#Run command to start daemons
|
||||
$COMMAND
|
||||
exit $?
|
Loading…
Add table
Add a link
Reference in a new issue