Thanks for the reply. It could very well be the init.d/weewx script but
i've started at it and from what i understand, i can't see an error. I've
attached weewx.txt which is the top half of the init.d script.

I cleared the syslog and the weewx.log and then i rebooted. After the
reboot i pasted the syslog into the attached syslog.txt - and the weewx.log
remained empty so nothing to attach.

After the boot, i tried to run this sudo /etc/init.d/weewx start and
nothing happens, nor gets added to the log.

Lastly, i ran *cd /home/weewx* and then *sudo ./bin/weewxd* and it
immediately worked and started working.



On Sun, Jul 4, 2021 at 6:54 PM Tom Keffer <[email protected]> wrote:

> Make sure the script in /etc/init.d/weewx references your new copy of
> weewxd in /home/weewx/bin, and not the old copy in /usr/share/weewx
>
> But, it's hard to say anything definitive without seeing the log.
>
> -tk
>
> On Sun, Jul 4, 2021 at 6:50 AM [email protected] <[email protected]>
> wrote:
>
>> Hi,
>>
>> I originally had weewx installed using the DEB package which was fine.
>> With the intention of using multiple instances of weewx for different
>> stations, I have uninstalled that and then I re-installed weewx using
>> setup.py to the /home/weewx/
>>
>> It works perfectly when I run it directly in terminal using *sudo
>> ./bin/weewxd* but I have not been able to add the script to
>> *init.d/weewx* in order for it to run at boot. I have followed the
>> instructions at https://weewx.com/docs/setup.htm but weewx will not
>> start at boot and after boot, even if I manually run sudo
>> /etc/init.d/weewx start it does nothing. I can tell because I'm tailing
>> the log file and nothing happens. Run it manually, it starts collecting
>> data perfectly.
>>
>> I used the default file from /weewx/utils/weewx.debian and copied it to
>> /etc/init.d/weewx and I did not make any changes. Is there something else
>> I'm supposed to do. The weewx installation was done to the default
>> /home/weewx directory.
>>
>> Would appreciate any suggestions.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/weewx-user/9cfe9263-c54c-47f3-9ed5-f2197bb7696en%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/9cfe9263-c54c-47f3-9ed5-f2197bb7696en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/POwnsa43jyI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAPq0zEA7A0rcQ_OqmiqdYe_6MTNXy-rJH1LH8Vge1heqAxkuNg%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEA7A0rcQ_OqmiqdYe_6MTNXy-rJH1LH8Vge1heqAxkuNg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CALeSoZkYr1JAhQKfr4MJ%3DBQJoKnhrs%2BfFGKUt7Ku3rcRcdo_0g%40mail.gmail.com.
Jul  4 20:52:12 raspberrypi systemd[1]: Starting Daily apt download 
activities...
Jul  4 20:52:12 raspberrypi systemd[1]: Starting Rotate log files...
Jul  4 20:52:12 raspberrypi systemd[1]: Starting Daily man-db regeneration...
Jul  4 20:52:12 raspberrypi systemd[1]: logrotate.service: Succeeded.
Jul  4 20:52:12 raspberrypi systemd[1]: Started Rotate log files.
Jul  4 20:52:14 raspberrypi systemd[1]: man-db.service: Succeeded.
Jul  4 20:52:14 raspberrypi systemd[1]: Started Daily man-db regeneration.
Jul  4 20:52:14 raspberrypi systemd[1]: apt-daily.service: Succeeded.
Jul  4 20:52:14 raspberrypi systemd[1]: Started Daily apt download activities.
Jul  4 20:52:14 raspberrypi systemd[1]: frpc.service: Service RestartSec=5s 
expired, scheduling restart.
Jul  4 20:52:14 raspberrypi systemd[1]: frpc.service: Scheduled restart job, 
restart counter is at 14.
Jul  4 20:52:14 raspberrypi systemd[1]: Stopped frpc service.
Jul  4 20:52:14 raspberrypi systemd[1]: Started frpc service.
Jul  4 20:52:14 raspberrypi systemd[1]: Starting Daily apt upgrade and clean 
activities...
Jul  4 20:52:14 raspberrypi frpc[1079]: 2021/07/04 20:52:14 #033[1;34m[I] 
[service.go:290] [0c2050be25a9d564] login to server success, get run id [0c2050$
Jul  4 20:52:14 raspberrypi frpc[1079]: 2021/07/04 20:52:14 #033[1;34m[I] 
[proxy_manager.go:144] [0c2050be25a9d564] proxy added: [ssh1]#033[0m
Jul  4 20:52:15 raspberrypi frpc[1079]: 2021/07/04 20:52:15 #033[1;34m[I] 
[control.go:180] [0c2050be25a9d564] [ssh1] start proxy success#033[0m
Jul  4 20:52:15 raspberrypi systemd[1]: apt-daily-upgrade.service: Succeeded.
Jul  4 20:52:15 raspberrypi systemd[1]: Started Daily apt upgrade and clean 
activities.
Jul  4 20:53:13 raspberrypi ntpd[484]: Soliciting pool server 2606:4700:f1::123
Jul  4 20:53:59 raspberrypi systemd[1]: Started Session 4 of user pi.
#! /bin/sh
# Author: Tom Keffer <[email protected]>
# Startup script for Debian derivatives
#
# the skeleton script in debian 6 does not work properly in package scripts.
# the return/exit codes cause {pre|post}{inst|rm} to fail regardless of the
# script completion status.  this script exits explicitly.
#
# the skeleton script also does not work properly with python applications,
# as the lsb tools cannot distinguish between the python interpreter and
# the python code that was invoked.  this script uses ps and grep to look
# for the application signature instead of using the lsb tools to determine
# whether the app is running.
#
### BEGIN INIT INFO
# Provides:          weewx
# Required-Start:    $local_fs $remote_fs $syslog $time
# Required-Stop:     $local_fs $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: weewx weather system
# Description:       Manages the weewx weather system
### END INIT INFO

# Do NOT "set -e"

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin

DESC="weewx weather system"
NAME=weewx

# these can be overridden in the default file
WEEWX_BIN=/home/weewx/bin/weewxd
WEEWX_CFG=/home/weewx/weewx.conf
WEEWX_PID=/var/run/$NAME.pid
WEEWX_USER=root:root 

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Exit if the package is not installed
[ -x "$WEEWX_BIN" ] || exit 0

DAEMON=$WEEWX_BIN
DAEMON_ARGS="--daemon --pidfile=$WEEWX_PID $WEEWX_CFG" 

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

# start the daemon/service
#   0 if daemon has been started
#   1 if daemon was already running
#   2 if daemon could not be started
# check using ps not the pid file.  pid file could be leftover.
do_start() {
    NPROC=$(count_procs)
    if [ $NPROC != 0 ]; then
        return 1
    fi
    start-stop-daemon --start --chuid $WEEWX_USER --pidfile $WEEWX_PID --exec 
$DAEMON -- $DAEMON_ARGS || return 2
    return 0
}

Reply via email to