Consequent use of 'alice-lg' instead of 'alicelg'
Replace 'alicelg' on multiple occasions with 'alice-lg'. * config and default config path * README.md * systemd unit, users, paths * Makefile
This commit is contained in:
parent
a18cd6484f
commit
41a17fe99f
3
.gitignore
vendored
3
.gitignore
vendored
@ -28,9 +28,8 @@ DIST/
|
||||
|
||||
var/
|
||||
|
||||
etc/alicelg/alice.conf
|
||||
etc/alice-lg/alice.conf
|
||||
|
||||
.DS_Store
|
||||
|
||||
*coverage*
|
||||
|
||||
|
12
Makefile
12
Makefile
@ -50,8 +50,8 @@ alice: client_prod backend_prod
|
||||
|
||||
dist: clean alice
|
||||
|
||||
mkdir -p $(DIST)opt/ecix/alicelg/bin
|
||||
mkdir -p $(DIST)etc/alicelg
|
||||
mkdir -p $(DIST)opt/alice-lg/alice-lg/bin
|
||||
mkdir -p $(DIST)etc/alice-lg
|
||||
|
||||
# Adding post install script
|
||||
cp install/scripts/after_install $(DIST)/.
|
||||
@ -67,10 +67,10 @@ else
|
||||
endif
|
||||
|
||||
# Copy example configuration
|
||||
cp etc/alicelg/alice.example.conf $(DIST)/etc/alicelg/alice.example.conf
|
||||
cp etc/alice-lg/alice.example.conf $(DIST)/etc/alice-lg/alice.example.conf
|
||||
|
||||
# Copy application
|
||||
cp bin/$(PROG)-linux-$(ARCH) DIST/opt/ecix/alicelg/bin/.
|
||||
cp bin/$(PROG)-linux-$(ARCH) DIST/opt/ecix/alice-lg/bin/.
|
||||
|
||||
|
||||
rpm: dist
|
||||
@ -81,7 +81,7 @@ rpm: dist
|
||||
# Create RPM from dist
|
||||
fpm -s dir -t rpm -n $(PROG) -v $(VERSION) -C $(DIST) \
|
||||
--architecture $(ARCH) \
|
||||
--config-files /etc/alicelg/alice.example.conf \
|
||||
--config-files /etc/alice-lg/alice.example.conf \
|
||||
--after-install $(DIST)/after_install \
|
||||
opt/ etc/
|
||||
|
||||
@ -102,7 +102,7 @@ remote_rpm: build_server dist
|
||||
scp -r $(DIST) $(BUILD_SERVER):$(REMOTE_DIST)
|
||||
ssh $(BUILD_SERVER) -- fpm -s dir -t rpm -n $(PROG) -v $(VERSION) -C $(REMOTE_DIST) \
|
||||
--architecture $(ARCH) \
|
||||
--config-files /etc/alicelg/alice.example.conf \
|
||||
--config-files /etc/alice-lg/alice.example.conf \
|
||||
--after-install $(REMOTE_DIST)/after_install \
|
||||
opt/ etc/
|
||||
|
||||
|
12
README.md
12
README.md
@ -3,7 +3,7 @@ __"No, no! The adventures first, explanations take such a dreadful time."__
|
||||
_Lewis Carroll, Alice's Adventures in Wonderland & Through the Looking-Glass_
|
||||
|
||||
Take a look at an Alice-LG production examples at:
|
||||
- https://lg-beta.de-cix.net/
|
||||
- https://lg.de-cix.net/
|
||||
- https://lg.ecix.net/
|
||||
|
||||
And checkout the API at:
|
||||
@ -64,16 +64,16 @@ Your Alice-LG source will now be located at `~/go/src/github.com/alice-lg/alice-
|
||||
## Configuration
|
||||
|
||||
An example configuration can be found at
|
||||
[etc/alicelg/alice.example.conf](https://github.com/ecix/alice-lg/blob/readme_update/etc/alicelg/alice.example.conf).
|
||||
[etc/alice-lg/alice.example.conf](https://github.com/alice-lg/alice-lg/blob/readme_update/etc/alice-lg/alice.example.conf).
|
||||
|
||||
You can copy it to any of the following locations:
|
||||
|
||||
etc/alicelg/alice.conf # local
|
||||
etc/alicelg/alice.local.conf # local
|
||||
/etc/alicelg/alice.conf # global
|
||||
etc/alice-lg/alice.conf # local
|
||||
etc/alice-lg/alice.local.conf # local
|
||||
/etc/alice-lg/alice.conf # global
|
||||
|
||||
|
||||
You will have to edit the configuration file as you need to point Alice-LG to the correct [APIs](https://github.com/ecix/birdwatcher):
|
||||
You will have to edit the configuration file as you need to point Alice-LG to the correct [APIs](https://github.com/alice-lg/birdwatcher):
|
||||
|
||||
```ini
|
||||
[source.0]
|
||||
|
@ -621,9 +621,9 @@ func getSources(config *ini.File) ([]*SourceConfig, error) {
|
||||
// Try to load configfiles as specified in the files
|
||||
// list. For example:
|
||||
//
|
||||
// ./etc/alicelg/alice.conf
|
||||
// /etc/alicelg/alice.conf
|
||||
// ./etc/alicelg/alice.local.conf
|
||||
// ./etc/alice-lg/alice.conf
|
||||
// /etc/alice-lg/alice.conf
|
||||
// ./etc/alice-lg/alice.local.conf
|
||||
//
|
||||
func loadConfig(file string) (*Config, error) {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
|
||||
func TestLoadConfigs(t *testing.T) {
|
||||
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -39,7 +39,7 @@ func TestLoadConfigs(t *testing.T) {
|
||||
|
||||
func TestSourceConfigDefaultsOverride(t *testing.T) {
|
||||
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -70,7 +70,7 @@ func TestSourceConfigDefaultsOverride(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRejectAndNoexportReasons(t *testing.T) {
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -97,7 +97,7 @@ func TestRejectAndNoexportReasons(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBlackholeParsing(t *testing.T) {
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -116,7 +116,7 @@ func TestBlackholeParsing(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOwnASN(t *testing.T) {
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -127,7 +127,7 @@ func TestOwnASN(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRpkiConfig(t *testing.T) {
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
}
|
||||
@ -157,7 +157,7 @@ func TestRpkiConfig(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRejectCandidatesConfig(t *testing.T) {
|
||||
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
||||
config, err := loadConfig("../etc/alice-lg/alice.example.conf")
|
||||
if err != nil {
|
||||
t.Error("Could not load test config:", err)
|
||||
return
|
||||
|
@ -17,7 +17,7 @@ func main() {
|
||||
|
||||
// Handle commandline parameters
|
||||
configFilenameFlag := flag.String(
|
||||
"config", "/etc/alicelg/alice.conf",
|
||||
"config", "/etc/alice-lg/alice.conf",
|
||||
"Alice looking glass configuration file",
|
||||
)
|
||||
|
||||
|
@ -5,12 +5,11 @@
|
||||
# Create the required user and set permissions
|
||||
#
|
||||
|
||||
SERVICE=alicelg
|
||||
SERVICE=alice-lg
|
||||
|
||||
echo "[i] Post install $SERVICE"
|
||||
echo "[i] Creating user and updating permissions"
|
||||
useradd --system -d /opt/ecix/$SERVICE $SERVICE
|
||||
useradd --system -d /opt/alice-lg/$SERVICE $SERVICE
|
||||
|
||||
echo "[i] Fixing permissions"
|
||||
chown -R $SERVICE:$SERVICE /opt/ecix/$SERVICE
|
||||
|
||||
chown -R $SERVICE:$SERVICE /opt/alice-lg/$SERVICE
|
||||
|
@ -5,8 +5,8 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=alicelg
|
||||
ExecStart=/opt/ecix/alicelg/bin/alice-lg-linux-amd64
|
||||
User=alice-lg
|
||||
ExecStart=/opt/alice-lg/alice-lg/bin/alice-lg-linux-amd64
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -10,5 +10,4 @@ respawn limit 20 10
|
||||
start on runlevel [2345]
|
||||
stop on runlevel [!2345]
|
||||
|
||||
exec su -l alicelg -c /opt/ecix/alicelg/bin/alice-lg-linux-amd64 2>&1 | logger -i -t 'ALICE LG'
|
||||
|
||||
exec su -l alice-lg -c /opt/alice-lg/alice-lg/bin/alice-lg-linux-amd64 2>&1 | logger -i -t 'ALICE LG'
|
||||
|
Loading…
x
Reference in New Issue
Block a user