Portál AbcLinuxu, 12. května 2025 10:51
#!/bin/sh /usr/sbin/openvpn /etc/openvpn/vpn5.conf echo "`date '+%Y-%m-%d %H:%M:%S'`: spoustim vpn5" >> vpn5_stav.txt exit 0soubor vpn5.conf je tento
local 192.168.1.34 remote 192.168.1.167 ifconfig 172.18.0.1 172.18.0.2 port 5005 proto udp dev tun0 secret /etc/openvpn/pokus.key comp-lzo verb 3 log-append /var/log/openvpn5.log keepalive 10 60 ping-timer-rem persist-tun persist-key user nobody group nogroup daemonpokud spustim pokus.sh z prikazove radky pod rootem vpn se nastartuje pokud ale tento script spoustim z cronu (pod root) vpn se nenastartuje crontab -l 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/script/pokus.sh log vypada takto:
Thu Feb 4 13:00:01 2010 OpenVPN 2.0.9 i486-pc-linux-gnu [SSL] [LZO] [EPOLL] built on Sep 20 2007 Thu Feb 4 13:00:01 2010 Static Encrypt: Cipher 'BF-CBC' initialized with 128 bit key Thu Feb 4 13:00:01 2010 Static Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication Thu Feb 4 13:00:01 2010 Static Decrypt: Cipher 'BF-CBC' initialized with 128 bit key Thu Feb 4 13:00:01 2010 Static Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication Thu Feb 4 13:00:01 2010 LZO compression initialized Thu Feb 4 13:00:01 2010 TUN/TAP device tun0 opened Thu Feb 4 13:00:01 2010 ifconfig tun0 172.18.0.1 pointopoint 172.18.0.2 mtu 1500 sh: ifconfig: command not found Thu Feb 4 13:00:01 2010 Linux ifconfig failed: could not execute shell command Thu Feb 4 13:00:01 2010 ExitingTo me docela stve....nevim proc se to tak chova
Řešení dotazu:
Thu Feb 4 13:00:01 2010 Linux ifconfig failed: could not execute shell command
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.