Search the process id matching the effective user. Send a signal name to the specified process
This commit is contained in:
parent
c8b952774e
commit
260bee58db
|
@ -2,6 +2,7 @@
|
|||
|
||||
# ZNC account creation
|
||||
CONF="$HOME/.znc/configs/znc.conf"
|
||||
PID=$(pgrep -u znc znc)
|
||||
|
||||
# $username and $password are retrieved from create-account script
|
||||
if [[ -z $1 || -z $2 ]]
|
||||
|
@ -12,7 +13,7 @@ if
|
|||
username=$1
|
||||
password=$2
|
||||
|
||||
pkill -10 -u znc znc # Rewrite znc.conf
|
||||
kill -s USR1 $PID # Rewrite znc.conf
|
||||
sleep 1
|
||||
|
||||
# set username and password
|
||||
|
@ -28,5 +29,5 @@ EOF
|
|||
echo " </Pass>" >> $CONF
|
||||
echo "</User>" >> $CONF
|
||||
|
||||
pkill -1 -u znc znc # Reload znc.conf
|
||||
pkill -10 -u znc znc # Rewrite znc.conf
|
||||
kill -s HUP $PID # Reload znc.conf
|
||||
kill -s USR1 $PID # Rewrite znc.conf
|
||||
|
|
Loading…
Reference in New Issue