/srv/irclogs.ubuntu.com/2015/01/01/#ubuntu-server.txt

=== cnj_ is now known as cnj
=== markthomas is now known as markthomas|away
=== zz_DenBeiren is now known as DenBeiren
=== MoeD_ is now known as MoeD
=== Tribaal_ is now known as Tribaal
=== mld_ is now known as mld
=== Lcawte|Away is now known as Lcawte
=== bilde2910|away is now known as bilde2910
AisonI asked about GVRP Support in Ubuntu Server, now I found my own solution16:32
Aisonmaybe somebody is interested16:33
Aisonin "/etc/network/if-pre-up.d/vlan" replace "vconfig add $IF_VLAN_RAW_DEVICE $VLANID" by "ip link add link $IF_VLAN_RAW_DEVICE $IFACE type vlan id $VLANID gvrp on loose_binding on"16:33
Aisonand in "/etc/network/if-post-down.d/vlan" replace "vconfig rem $IFACE" by "ip link delete $IFACE"16:34
Aisonthis change should be even done in official release. vconfig should  be replace by ip link add anyway16:36
TimRHi guys I am having apache2 issues the server isnt redirecting to the correct site and I have sites enabled but its not redirecting17:07
=== IdleOne is now known as Guest98005
DonRichieTimR: Error 204: Not enough information to compute solution. Aborting...19:09
lnxmenProbably he has wrong root path in virtual host.19:22
lnxmenOr wrong configured .htaccess19:23
lnxmenOr simply he did not restart apache.19:23
=== bilde2910 is now known as bilde2910|away
stiv2khi22:01
lnxmenHi22:02
stiv2kwhat is the simplest way to run a command as root once a day22:02
lnxmenUse cron22:03
stiv2kto restart my tf2 server i want it to run service tf2-server restart22:03
stiv2kbut it has to run with root permission22:03
lnxmenYes, that's possible.22:03
Patrickdkssh into the server22:03
stiv2klnxmen: i just put it in /etc/cron.daily or whatever?22:03
lnxmenstiv2k: /etc/crontab22:04
stiv2kthat's roots crontab?22:04
Patrickdkna, don't use /etc/crontab22:04
Patrickdkuse /etc/cron.daily/xxxx22:04
Patrickdkroot has it's own, using crontab -e -u root22:04
stiv2koh22:04
lnxmenPatrickdk: Why not?22:04
lnxmenI am just curious.22:05
stiv2kso make a sh script, #!/bin/sh, then on the next line service tf2-server restart, save the script in /etc/cron.daily with +x permission22:05
lnxmenI always used it in this way.22:05
Patrickdklnxmen, cause then you will break every UPGRADE you do to the system22:05
Patrickdkwhy have to manually fix that file? when /etc/cron.daily was provided for this purpose?22:05
Patrickdkyes you can, but you have to FIX it yourself too22:05
=== bilde2910|away is now known as bilde2910
=== neunon_ is now known as neunon
=== Tzunamii_ is now known as Tzunamii
=== DavidDuffey is now known as dduffey
lnxmenOkay. Thanks for the explanation.22:06
=== hardwire- is now known as hardwire
cryptodanserver scripts dont go in cron22:06
stiv2k?22:06
=== robher_ is now known as robher
cryptodanstiv2k: what are you trying to do?22:08
lnxmenHe tries to execute script as root daily.22:10
cryptodanstiv2k: bad idea22:11
cryptodanand also the tf2 server daemon will auto restart upon crash22:11
cryptodanstiv2k: read this https://wiki.teamfortress.com/wiki/Linux_dedicated_server22:12
stiv2kcryptodan: its about the updates22:13
stiv2kcryptodan: they update the server version pretty often, every week or so, and it checks for updates when it restarts22:13
stiv2kso if it doesnt restart, it falls behind in version and nobody can play on it22:14
cryptodanstiv2k: you still should not be running it as root22:14
stiv2kthe server itself does not run as root22:14
stiv2kit runs via init script22:14
stiv2kthat starts it under a normal user22:14
cryptodanstiv2k: but if you run the tf2server script as root in cron it runs as root22:14
stiv2kusing start-stop-daemon22:14
stiv2kstart-stop-daemon --start --chuid $USER --user $USER --chdir $BINARYPATH --exec "/usr/bin/screen" -- -dmS $SCREENREF $BINARYPATH/$BINARYNAME $OPTS22:15
stiv2k^^^22:15
stiv2kso the server never runs as root22:15
cryptodanso then you install the cron setting under the user as your tf2 server runs under22:17
stiv2kno22:18
stiv2kthat user cannot run init scripts22:18
stiv2kinit script can only be run from sudo22:19
cryptodanthen when that cron entry starts its starts all processes after that as root22:19
cryptodanso follow that guide I linked to https://wiki.teamfortress.com/wiki/Linux_dedicated_server to do it right.  and your server should never fall behind as when you start it up it should autocheck for updates22:20
stiv2kyes it does but it needs to be restarted periodically to check the updates22:20
cryptodanit auto checks22:20
=== SJrX is now known as SJr
=== Lcawte is now known as Lcawte|Away
=== Metacity is now known as TotallyNotMetaci
=== TotallyNotMetaci is now known as Metacity

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!